@Only-api
@Post
@Get
@Delete
@Procedure
Feature: Stem Cell Transplantation resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Procedure node. This resource is part of the Stem Cell Transplantation.
File name: xas.feature
Relative path: api/xas.feature
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:42:59.709 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:00.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:00.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rM6ioQx1NBFPkSGq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21174/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:00.357 [print] {
"resourceType": "Procedure",
"id": "21174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:03.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:43:00.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:00.359 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:00.359 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rM6ioQx1NBFPkSGq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21174/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21174/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:00.359 [print] {
"resourceType": "Procedure",
"id": "21174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:03.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:43:00.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:00.976 [print] {
"resourceType": "Procedure",
"id": "21174",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:03.530+02:00",
"source": "#rM6ioQx1NBFPkSGq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:01.594 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:02.406 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:04.793+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:04.793+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:02.408 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:02.997 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:02.997 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GAxlCywRLZgC80XB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21175/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:02.997 [print] {
"resourceType": "Procedure",
"id": "21175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:06.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:43:02.997 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:02.998 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:02.998 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GAxlCywRLZgC80XB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21175/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21175/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:02.999 [print] {
"resourceType": "Procedure",
"id": "21175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:06.194+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:43:02.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:03.680 [print] {
"resourceType": "Procedure",
"id": "21175",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:06.194+02:00",
"source": "#GAxlCywRLZgC80XB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:04.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:04.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:07.485+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:07.485+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:04.920 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:05.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:05.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QQPeuA30p9lYvU0I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21176/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:05.541 [print] {
"resourceType": "Procedure",
"id": "21176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:08.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:43:05.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:05.542 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:05.542 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QQPeuA30p9lYvU0I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21176/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21176/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:05.542 [print] {
"resourceType": "Procedure",
"id": "21176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:08.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:43:05.542 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:06.217 [print] {
"resourceType": "Procedure",
"id": "21176",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:08.731+02:00",
"source": "#QQPeuA30p9lYvU0I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:06.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:08.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:10.034+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:10.034+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:08.476 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:09.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:09.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6THcgXpjHbOC9tNL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21177/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:09.113 [print] {
"resourceType": "Procedure",
"id": "21177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:12.298+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:43:09.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:09.115 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:09.115 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6THcgXpjHbOC9tNL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21177/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21177/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:09.115 [print] {
"resourceType": "Procedure",
"id": "21177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:12.298+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:43:09.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:09.726 [print] {
"resourceType": "Procedure",
"id": "21177",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:12.298+02:00",
"source": "#6THcgXpjHbOC9tNL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:10.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:10.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:13.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:13.528+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:10.966 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:11.576 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:11.576 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5UXYq1Q7m6PGosDJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21178/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:11.576 [print] {
"resourceType": "Procedure",
"id": "21178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:14.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:43:11.576 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:11.578 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:11.578 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5UXYq1Q7m6PGosDJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21178/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21178/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:11.579 [print] {
"resourceType": "Procedure",
"id": "21178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:14.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
> *
print COOKIES
11:43:11.579 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:12.176 [print] {
"resourceType": "Procedure",
"id": "21178",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:14.773+02:00",
"source": "#5UXYq1Q7m6PGosDJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:12.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:13.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:15.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:15.974+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:13.398 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:14.008 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:14.008 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CeSbBQ6tGE4Jh1DO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21179/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:14.008 [print] {
"resourceType": "Procedure",
"id": "21179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:17.201+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:43:14.008 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:14.009 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:14.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CeSbBQ6tGE4Jh1DO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21179/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21179/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:14.010 [print] {
"resourceType": "Procedure",
"id": "21179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:17.201+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:43:14.010 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:14.610 [print] {
"resourceType": "Procedure",
"id": "21179",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:17.201+02:00",
"source": "#CeSbBQ6tGE4Jh1DO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:15.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 19ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 19ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:15.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:18.445+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:18.445+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:15.878 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:16.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:16.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZhlAO67wSzao15e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21180/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:16.686 [print] {
"resourceType": "Procedure",
"id": "21180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:19.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:43:16.686 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:16.687 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:16.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZhlAO67wSzao15e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21180/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21180/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:16.687 [print] {
"resourceType": "Procedure",
"id": "21180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:19.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:43:16.687 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:17.369 [print] {
"resourceType": "Procedure",
"id": "21180",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:19.879+02:00",
"source": "#9ZhlAO67wSzao15e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:17.997 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:18.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:21.191+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:21.191+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:18.616 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:19.214 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:19.214 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lbxJYcYKemETIH6m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21181/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:19.214 [print] {
"resourceType": "Procedure",
"id": "21181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:22.413+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:43:19.214 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:19.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:19.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lbxJYcYKemETIH6m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21181/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21181/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:19.215 [print] {
"resourceType": "Procedure",
"id": "21181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:22.413+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:43:19.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:19.821 [print] {
"resourceType": "Procedure",
"id": "21181",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:22.413+02:00",
"source": "#lbxJYcYKemETIH6m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-09-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:20.482 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:21.127 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:23.677+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:23.677+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:21.129 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:21.729 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:21.729 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MyVm2SDcKsT0qQzJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21182/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:21.729 [print] {
"resourceType": "Procedure",
"id": "21182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:24.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:43:21.729 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:21.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:21.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MyVm2SDcKsT0qQzJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21182/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21182/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:21.730 [print] {
"resourceType": "Procedure",
"id": "21182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:24.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:43:21.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:22.416 [print] {
"resourceType": "Procedure",
"id": "21182",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:24.924+02:00",
"source": "#MyVm2SDcKsT0qQzJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:23.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:23.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:26.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:26.231+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:23.638 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:24.250 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:24.250 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6hzNmJMYdTKplJxB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21183/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:24.250 [print] {
"resourceType": "Procedure",
"id": "21183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:27.448+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:43:24.250 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:24.252 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:24.252 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6hzNmJMYdTKplJxB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21183/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21183/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:24.252 [print] {
"resourceType": "Procedure",
"id": "21183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:27.448+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:43:24.252 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:24.885 [print] {
"resourceType": "Procedure",
"id": "21183",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:27.448+02:00",
"source": "#6hzNmJMYdTKplJxB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:25.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:26.160 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:28.719+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:28.719+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:26.162 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:26.785 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:26.785 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZwPEvPFTkaqFsnGK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21184/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:26.785 [print] {
"resourceType": "Procedure",
"id": "21184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:29.982+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:43:26.785 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:26.786 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:26.786 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZwPEvPFTkaqFsnGK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21184/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21184/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:26.787 [print] {
"resourceType": "Procedure",
"id": "21184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:29.982+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:43:26.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:27.423 [print] {
"resourceType": "Procedure",
"id": "21184",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:29.982+02:00",
"source": "#ZwPEvPFTkaqFsnGK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:28.037 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:28.630 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:31.226+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:31.226+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:28.631 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:29.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:29.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlU6tK4beZztAKhS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21185/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:29.268 [print] {
"resourceType": "Procedure",
"id": "21185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:32.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:43:29.268 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:29.270 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:29.270 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TlU6tK4beZztAKhS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21185/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21185/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:29.270 [print] {
"resourceType": "Procedure",
"id": "21185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:32.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:43:29.270 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:29.865 [print] {
"resourceType": "Procedure",
"id": "21185",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:32.458+02:00",
"source": "#TlU6tK4beZztAKhS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:30.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:31.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:33.697+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:33.697+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:31.126 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:31.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:31.743 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pzoUqumEKc6U28Rw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21186/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:31.744 [print] {
"resourceType": "Procedure",
"id": "21186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:34.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:43:31.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:31.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:31.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pzoUqumEKc6U28Rw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21186/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21186/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:31.745 [print] {
"resourceType": "Procedure",
"id": "21186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:34.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:43:31.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:32.364 [print] {
"resourceType": "Procedure",
"id": "21186",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:34.941+02:00",
"source": "#pzoUqumEKc6U28Rw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:32.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:33.569 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:36.158+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:36.158+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:33.569 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:34.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:34.183 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xtj22YOGv58eObEG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21187/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:34.183 [print] {
"resourceType": "Procedure",
"id": "21187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:37.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:43:34.183 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:34.184 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:34.184 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Xtj22YOGv58eObEG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21187/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21187/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:34.184 [print] {
"resourceType": "Procedure",
"id": "21187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:37.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:43:34.184 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:34.793 [print] {
"resourceType": "Procedure",
"id": "21187",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:37.378+02:00",
"source": "#Xtj22YOGv58eObEG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:35.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:36.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:38.621+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:38.621+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:36.067 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:36.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:36.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ga8pUN4L9mIEiJ4q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21188/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:36.684 [print] {
"resourceType": "Procedure",
"id": "21188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:39.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:43:36.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:36.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:36.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ga8pUN4L9mIEiJ4q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21188/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21188/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:36.685 [print] {
"resourceType": "Procedure",
"id": "21188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:39.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:43:36.685 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:37.394 [print] {
"resourceType": "Procedure",
"id": "21188",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:39.878+02:00",
"source": "#Ga8pUN4L9mIEiJ4q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:38.017 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:38.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:41.210+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:41.210+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:38.657 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:39.384 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:39.384 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NNGg4ZAVtcr77ABD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21189/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:39.384 [print] {
"resourceType": "Procedure",
"id": "21189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:42.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:43:39.384 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:39.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:39.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NNGg4ZAVtcr77ABD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21189/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21189/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:39.385 [print] {
"resourceType": "Procedure",
"id": "21189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:42.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:43:39.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:39.993 [print] {
"resourceType": "Procedure",
"id": "21189",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:42.573+02:00",
"source": "#NNGg4ZAVtcr77ABD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:40.626 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:42.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:43.811+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:43.811+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:42.258 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:42.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:42.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2svCK2NqVf4bY1UG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21190/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:42.872 [print] {
"resourceType": "Procedure",
"id": "21190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:46.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:43:42.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:42.873 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:42.873 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2svCK2NqVf4bY1UG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21190/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21190/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:42.873 [print] {
"resourceType": "Procedure",
"id": "21190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:46.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:43:42.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:43.502 [print] {
"resourceType": "Procedure",
"id": "21190",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:46.055+02:00",
"source": "#2svCK2NqVf4bY1UG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:44.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:44.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:47.306+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:47.306+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:44.752 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:45.386 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:45.386 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fXeirsFzeUB1DMnN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21191/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:45.386 [print] {
"resourceType": "Procedure",
"id": "21191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:48.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:43:45.386 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:45.388 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:45.388 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fXeirsFzeUB1DMnN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21191/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21191/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:45.388 [print] {
"resourceType": "Procedure",
"id": "21191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:48.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:43:45.388 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:46.003 [print] {
"resourceType": "Procedure",
"id": "21191",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:48.574+02:00",
"source": "#fXeirsFzeUB1DMnN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:46.616 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:47.208 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:49.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:49.814+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:47.209 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:47.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:47.809 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ifi1YSDBu0GdCJH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21192/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:47.809 [print] {
"resourceType": "Procedure",
"id": "21192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:51.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:43:47.809 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:47.810 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:47.810 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ifi1YSDBu0GdCJH8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21192/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21192/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:47.810 [print] {
"resourceType": "Procedure",
"id": "21192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:51.007+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:43:47.810 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:48.405 [print] {
"resourceType": "Procedure",
"id": "21192",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:51.007+02:00",
"source": "#Ifi1YSDBu0GdCJH8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:49.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:49.678 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:52.233+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:52.233+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:49.680 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:50.304 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:50.304 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gDZKKoWcJ870toy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21193/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:50.304 [print] {
"resourceType": "Procedure",
"id": "21193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:53.500+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:43:50.304 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:50.305 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:50.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4gDZKKoWcJ870toy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21193/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21193/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:50.305 [print] {
"resourceType": "Procedure",
"id": "21193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:53.500+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:43:50.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:50.917 [print] {
"resourceType": "Procedure",
"id": "21193",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:53.500+02:00",
"source": "#4gDZKKoWcJ870toy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:51.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:52.160 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:54.730+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:54.730+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:52.161 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:52.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:52.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q9CoHyssIGzun9yk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21194/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:52.782 [print] {
"resourceType": "Procedure",
"id": "21194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:55.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:43:52.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:52.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:52.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q9CoHyssIGzun9yk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21194/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21194/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:52.784 [print] {
"resourceType": "Procedure",
"id": "21194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:55.975+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:43:52.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:53.394 [print] {
"resourceType": "Procedure",
"id": "21194",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:55.975+02:00",
"source": "#Q9CoHyssIGzun9yk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:54.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:54.608 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:57.202+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:57.202+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:54.609 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:55.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:55.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"itlZXIeS81hedzq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21195/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:55.233 [print] {
"resourceType": "Procedure",
"id": "21195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:58.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:43:55.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:55.235 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:55.235 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"itlZXIeS81hedzq3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21195/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:43:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21195/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:43:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:55.235 [print] {
"resourceType": "Procedure",
"id": "21195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:58.430+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:43:55.235 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:55.846 [print] {
"resourceType": "Procedure",
"id": "21195",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:43:58.430+02:00",
"source": "#itlZXIeS81hedzq3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:56.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:57.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:43:59.666+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:43:59.666+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:57.097 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:57.782 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:57.782 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKXPdzot8mFBzCNT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21196/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:57.782 [print] {
"resourceType": "Procedure",
"id": "21196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:00.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:43:57.782 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:43:57.784 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:43:57.784 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PKXPdzot8mFBzCNT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21196/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21196/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:43:57.784 [print] {
"resourceType": "Procedure",
"id": "21196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:00.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:43:57.784 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:43:58.395 [print] {
"resourceType": "Procedure",
"id": "21196",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:00.960+02:00",
"source": "#PKXPdzot8mFBzCNT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:43:59.002 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:43:59.610 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:02.195+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:02.195+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:43:59.612 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:00.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:00.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wENZnbV00FKlNIia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21197/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:00.240 [print] {
"resourceType": "Procedure",
"id": "21197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:03.433+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:44:00.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:00.241 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:00.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wENZnbV00FKlNIia"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21197/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21197/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:00.241 [print] {
"resourceType": "Procedure",
"id": "21197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:03.433+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:44:00.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:00.846 [print] {
"resourceType": "Procedure",
"id": "21197",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:03.433+02:00",
"source": "#wENZnbV00FKlNIia",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:01.481 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:02.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:04.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:04.664+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:02.102 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:02.740 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:02.740 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j0vgHHR4BGDG5GAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21198/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:02.740 [print] {
"resourceType": "Procedure",
"id": "21198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:05.929+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:44:02.740 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:02.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:02.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j0vgHHR4BGDG5GAg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21198/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21198/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:02.742 [print] {
"resourceType": "Procedure",
"id": "21198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:05.929+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:44:02.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:03.354 [print] {
"resourceType": "Procedure",
"id": "21198",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:05.929+02:00",
"source": "#j0vgHHR4BGDG5GAg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:03.988 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:05.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:07.177+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:07.177+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:05.648 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:06.287 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:06.287 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y4fEa6sE1FctPqZn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21199/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:06.287 [print] {
"resourceType": "Procedure",
"id": "21199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:09.463+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:44:06.288 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:06.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:06.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y4fEa6sE1FctPqZn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21199/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21199/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:06.290 [print] {
"resourceType": "Procedure",
"id": "21199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:09.463+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
> *
print COOKIES
11:44:06.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:06.900 [print] {
"resourceType": "Procedure",
"id": "21199",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:09.463+02:00",
"source": "#y4fEa6sE1FctPqZn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:07.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:08.138 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:10.720+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:10.720+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:08.140 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:08.771 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:08.771 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfZAz6yfNzFtSexR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21200/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:08.771 [print] {
"resourceType": "Procedure",
"id": "21200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:11.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:44:08.771 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:08.772 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:08.772 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tfZAz6yfNzFtSexR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21200/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21200/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:08.772 [print] {
"resourceType": "Procedure",
"id": "21200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:11.955+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
> *
print COOKIES
11:44:08.772 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:09.367 [print] {
"resourceType": "Procedure",
"id": "21200",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:11.955+02:00",
"source": "#tfZAz6yfNzFtSexR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:10.002 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:10.673 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:13.192+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:13.192+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:10.674 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:11.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:11.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgNu1VHG5jlZGjQw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21201/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:11.276 [print] {
"resourceType": "Procedure",
"id": "21201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:14.470+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:44:11.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:11.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:11.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgNu1VHG5jlZGjQw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21201/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21201/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:11.277 [print] {
"resourceType": "Procedure",
"id": "21201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:14.470+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:44:11.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:11.884 [print] {
"resourceType": "Procedure",
"id": "21201",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:14.470+02:00",
"source": "#XgNu1VHG5jlZGjQw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:12.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:13.115 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:15.698+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:15.698+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:13.116 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:13.762 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:13.762 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mwq7f5Ha8vgrp1GD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21202/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:13.762 [print] {
"resourceType": "Procedure",
"id": "21202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:16.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:44:13.762 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:13.764 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:13.764 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mwq7f5Ha8vgrp1GD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21202/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21202/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:13.764 [print] {
"resourceType": "Procedure",
"id": "21202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:16.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:44:13.764 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:14.387 [print] {
"resourceType": "Procedure",
"id": "21202",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:16.947+02:00",
"source": "#mwq7f5Ha8vgrp1GD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:15.003 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:15.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:18.195+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:18.195+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:15.884 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:16.511 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:16.512 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Iu1WwsbeyxgMFPmN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21203/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:16.512 [print] {
"resourceType": "Procedure",
"id": "21203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:19.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:44:16.512 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:16.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:16.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Iu1WwsbeyxgMFPmN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21203/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21203/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:16.513 [print] {
"resourceType": "Procedure",
"id": "21203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:19.707+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:44:16.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:17.143 [print] {
"resourceType": "Procedure",
"id": "21203",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:19.707+02:00",
"source": "#Iu1WwsbeyxgMFPmN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:18.780 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:19.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:21.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:21.966+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:19.403 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:20.015 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:20.015 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wsCAAJMTn9XyanaY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21204/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:20.015 [print] {
"resourceType": "Procedure",
"id": "21204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:23.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:44:20.015 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:20.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:20.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wsCAAJMTn9XyanaY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21204/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21204/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:20.016 [print] {
"resourceType": "Procedure",
"id": "21204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:23.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:44:20.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:20.855 [print] {
"resourceType": "Procedure",
"id": "21204",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:23.213+02:00",
"source": "#wsCAAJMTn9XyanaY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:21.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:22.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:24.762+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:24.762+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:22.225 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:22.849 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:22.849 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wtgMeRdOvQ7V5ejb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21205/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:22.849 [print] {
"resourceType": "Procedure",
"id": "21205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:26.027+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:44:22.849 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:22.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:22.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wtgMeRdOvQ7V5ejb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21205/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21205/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:22.850 [print] {
"resourceType": "Procedure",
"id": "21205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:26.027+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
> *
print COOKIES
11:44:22.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:23.473 [print] {
"resourceType": "Procedure",
"id": "21205",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:26.027+02:00",
"source": "#wtgMeRdOvQ7V5ejb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:24.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:24.726 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:27.294+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:27.294+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:24.727 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:25.373 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:25.373 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bc94W9PZFPuaPRql"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21206/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:25.373 [print] {
"resourceType": "Procedure",
"id": "21206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:28.547+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:44:25.373 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:25.374 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:25.374 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bc94W9PZFPuaPRql"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21206/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21206/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:25.374 [print] {
"resourceType": "Procedure",
"id": "21206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:28.547+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:44:25.374 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:26.009 [print] {
"resourceType": "Procedure",
"id": "21206",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:28.547+02:00",
"source": "#bc94W9PZFPuaPRql",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:26.634 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:27.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:29.828+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:29.828+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:27.235 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:27.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:27.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ccBdc7TnMQKWXNbM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21207/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:27.887 [print] {
"resourceType": "Procedure",
"id": "21207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:31.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:44:27.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:27.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:27.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ccBdc7TnMQKWXNbM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21207/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21207/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:27.889 [print] {
"resourceType": "Procedure",
"id": "21207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:31.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:44:27.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:37.055 [print] {
"resourceType": "Procedure",
"id": "21207",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:31.045+02:00",
"source": "#ccBdc7TnMQKWXNbM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:37.692 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:38.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:40.873+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:40.873+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:38.301 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:38.928 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:38.929 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NG4o50a8BMeShqXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21208/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:38.929 [print] {
"resourceType": "Procedure",
"id": "21208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:42.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:44:38.929 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:38.930 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:38.930 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NG4o50a8BMeShqXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21208/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:38.930 [print] {
"resourceType": "Procedure",
"id": "21208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:42.104+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:44:38.930 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:39.541 [print] {
"resourceType": "Procedure",
"id": "21208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:42.104+02:00",
"source": "#NG4o50a8BMeShqXj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:40.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:40.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:43.377+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:43.377+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:40.811 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:41.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:41.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3QGf7FPsjVvt0Grd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21209/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:41.451 [print] {
"resourceType": "Procedure",
"id": "21209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:44.642+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:44:41.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:41.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:41.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3QGf7FPsjVvt0Grd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21209/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:41.453 [print] {
"resourceType": "Procedure",
"id": "21209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:44.642+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:44:41.453 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:42.054 [print] {
"resourceType": "Procedure",
"id": "21209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:44.642+02:00",
"source": "#3QGf7FPsjVvt0Grd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:42.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:43.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:45.903+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:45.903+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:43.325 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:43.947 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:43.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PIKHY76821l4xnzo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21210/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:43.948 [print] {
"resourceType": "Procedure",
"id": "21210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:47.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:44:43.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:43.949 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:43.949 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PIKHY76821l4xnzo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21210/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:43.949 [print] {
"resourceType": "Procedure",
"id": "21210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:47.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:44:43.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:44.574 [print] {
"resourceType": "Procedure",
"id": "21210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:47.143+02:00",
"source": "#PIKHY76821l4xnzo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:45.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 19ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 19ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:46.267 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:48.811+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:48.811+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:46.269 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:46.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:46.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgtRIGtlQAu6plxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21211/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:46.874 [print] {
"resourceType": "Procedure",
"id": "21211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:50.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:44:46.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:46.875 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:46.875 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kgtRIGtlQAu6plxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21211/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:46.876 [print] {
"resourceType": "Procedure",
"id": "21211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:50.067+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:44:46.876 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:47.517 [print] {
"resourceType": "Procedure",
"id": "21211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:50.067+02:00",
"source": "#kgtRIGtlQAu6plxC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:48.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:48.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:51.328+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:51.328+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:48.748 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:49.401 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:49.401 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XLnkWZYE71ab6LHF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21212/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:49.401 [print] {
"resourceType": "Procedure",
"id": "21212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:52.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:44:49.401 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:49.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:49.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XLnkWZYE71ab6LHF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21212/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:49.402 [print] {
"resourceType": "Procedure",
"id": "21212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:52.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:44:49.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:50.001 [print] {
"resourceType": "Procedure",
"id": "21212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:52.587+02:00",
"source": "#XLnkWZYE71ab6LHF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:50.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:51.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:53.804+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:53.804+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:51.257 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:51.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:51.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wiaeSuMri01KljxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21213/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:51.907 [print] {
"resourceType": "Procedure",
"id": "21213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:55.092+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:44:51.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:51.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:51.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wiaeSuMri01KljxC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21213/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:51.908 [print] {
"resourceType": "Procedure",
"id": "21213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:55.092+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:44:51.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:52.509 [print] {
"resourceType": "Procedure",
"id": "21213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:55.092+02:00",
"source": "#wiaeSuMri01KljxC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:53.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:53.741 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:56.321+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:56.321+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:53.743 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:54.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:54.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5BuiNHGF7BaBFf7c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21214/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:54.355 [print] {
"resourceType": "Procedure",
"id": "21214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:57.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:44:54.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:54.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:54.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5BuiNHGF7BaBFf7c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21214/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:44:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:44:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:54.357 [print] {
"resourceType": "Procedure",
"id": "21214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:57.548+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:44:54.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:54.981 [print] {
"resourceType": "Procedure",
"id": "21214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:44:57.548+02:00",
"source": "#5BuiNHGF7BaBFf7c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:55.625 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:56.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:44:58.810+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:44:58.810+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:56.235 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:56.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:56.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1WnpdKRDoDb6Ee3Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21215/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:56.838 [print] {
"resourceType": "Procedure",
"id": "21215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:00.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:44:56.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:56.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:56.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1WnpdKRDoDb6Ee3Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21215/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:56.840 [print] {
"resourceType": "Procedure",
"id": "21215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:00.030+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:44:56.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:57.436 [print] {
"resourceType": "Procedure",
"id": "21215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:00.030+02:00",
"source": "#1WnpdKRDoDb6Ee3Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:44:58.054 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:44:58.664 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:01.243+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:01.243+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:44:58.665 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:59.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:59.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ti82eWlMRIlpU8Gl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21216/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:59.296 [print] {
"resourceType": "Procedure",
"id": "21216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:02.479+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:44:59.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:44:59.298 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:44:59.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ti82eWlMRIlpU8Gl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21216/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:44:59.298 [print] {
"resourceType": "Procedure",
"id": "21216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:02.479+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:44:59.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:44:59.892 [print] {
"resourceType": "Procedure",
"id": "21216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:02.479+02:00",
"source": "#ti82eWlMRIlpU8Gl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:00.529 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:01.139 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:03.715+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:03.715+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:01.140 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:01.795 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:01.795 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jK4ibHQ1OdZ0slHv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21217/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:01.795 [print] {
"resourceType": "Procedure",
"id": "21217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:04.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:45:01.795 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:01.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:01.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jK4ibHQ1OdZ0slHv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21217/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:01.797 [print] {
"resourceType": "Procedure",
"id": "21217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:04.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
> *
print COOKIES
11:45:01.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:02.395 [print] {
"resourceType": "Procedure",
"id": "21217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:04.978+02:00",
"source": "#jK4ibHQ1OdZ0slHv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:03.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:03.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:06.215+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:06.215+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:03.623 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:04.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:04.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OzSuslR3wmKe9l5U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21218/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:04.241 [print] {
"resourceType": "Procedure",
"id": "21218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:07.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:45:04.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:04.242 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:04.242 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OzSuslR3wmKe9l5U"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21218/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:04.242 [print] {
"resourceType": "Procedure",
"id": "21218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:07.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:45:04.242 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:04.840 [print] {
"resourceType": "Procedure",
"id": "21218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:07.435+02:00",
"source": "#OzSuslR3wmKe9l5U",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:05.456 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:06.063 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:08.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:08.643+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:06.064 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:06.686 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:06.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"93SAtH6QzfceFSvV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21219/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:06.687 [print] {
"resourceType": "Procedure",
"id": "21219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:09.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:45:06.687 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:06.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:06.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"93SAtH6QzfceFSvV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21219/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:06.688 [print] {
"resourceType": "Procedure",
"id": "21219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:09.880+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:45:06.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:07.279 [print] {
"resourceType": "Procedure",
"id": "21219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:09.880+02:00",
"source": "#93SAtH6QzfceFSvV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:07.894 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:08.487 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:11.088+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:11.088+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:08.488 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:09.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:09.088 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PHEAb4cWhuDgkfXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21220/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:09.088 [print] {
"resourceType": "Procedure",
"id": "21220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:12.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:45:09.088 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:09.090 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:09.090 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PHEAb4cWhuDgkfXj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21220/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:09.090 [print] {
"resourceType": "Procedure",
"id": "21220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:12.282+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:45:09.090 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:09.694 [print] {
"resourceType": "Procedure",
"id": "21220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:12.282+02:00",
"source": "#PHEAb4cWhuDgkfXj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:10.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:10.978 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:13.518+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:13.518+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:10.980 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:12.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:12.596 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jzdRkaGBULgCmSLZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21221/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:12.596 [print] {
"resourceType": "Procedure",
"id": "21221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:15.789+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:45:12.596 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:12.598 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:12.598 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jzdRkaGBULgCmSLZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21221/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:12.598 [print] {
"resourceType": "Procedure",
"id": "21221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:15.789+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:45:12.598 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:13.194 [print] {
"resourceType": "Procedure",
"id": "21221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:15.789+02:00",
"source": "#jzdRkaGBULgCmSLZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:13.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:14.420 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:17.006+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:17.006+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:14.420 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:15.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:15.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ijdqc339hwmZ1WBP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21222/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:15.049 [print] {
"resourceType": "Procedure",
"id": "21222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:18.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:45:15.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:15.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:15.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ijdqc339hwmZ1WBP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21222/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:15.050 [print] {
"resourceType": "Procedure",
"id": "21222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:18.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:45:15.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:15.668 [print] {
"resourceType": "Procedure",
"id": "21222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:18.231+02:00",
"source": "#Ijdqc339hwmZ1WBP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:16.290 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:17.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:19.476+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:19.476+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:17.898 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:18.521 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:18.521 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1dl2eXoi2ow3BtDY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21223/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:18.521 [print] {
"resourceType": "Procedure",
"id": "21223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:21.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:45:18.521 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:18.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:18.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1dl2eXoi2ow3BtDY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21223/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:18.522 [print] {
"resourceType": "Procedure",
"id": "21223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:21.713+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:45:18.523 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:20.426 [print] {
"resourceType": "Procedure",
"id": "21223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:21.713+02:00",
"source": "#1dl2eXoi2ow3BtDY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:21.073 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:21.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:24.244+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:24.244+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:21.676 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:22.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:22.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jC1pqQlaFcgxCxmK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21224/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:22.278 [print] {
"resourceType": "Procedure",
"id": "21224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:25.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:45:22.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:22.279 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:22.279 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jC1pqQlaFcgxCxmK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21224/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:22.279 [print] {
"resourceType": "Procedure",
"id": "21224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:25.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:45:22.279 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:22.877 [print] {
"resourceType": "Procedure",
"id": "21224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:25.466+02:00",
"source": "#jC1pqQlaFcgxCxmK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:23.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:24.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:26.783+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:26.783+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:24.477 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:25.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:25.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RQ7rErgIjizVu0gT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21225/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:25.109 [print] {
"resourceType": "Procedure",
"id": "21225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:28.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:45:25.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:25.110 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:25.110 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RQ7rErgIjizVu0gT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21225/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:25.110 [print] {
"resourceType": "Procedure",
"id": "21225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:28.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:45:25.110 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:25.762 [print] {
"resourceType": "Procedure",
"id": "21225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:28.292+02:00",
"source": "#RQ7rErgIjizVu0gT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:26.428 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 19ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 19ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:27.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:29.614+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:29.614+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:27.043 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:27.704 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:27.704 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6QJ4K8FFwYWYBWYp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21226/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:27.704 [print] {
"resourceType": "Procedure",
"id": "21226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:30.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:45:27.704 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:27.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:27.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6QJ4K8FFwYWYBWYp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21226/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:27.706 [print] {
"resourceType": "Procedure",
"id": "21226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:30.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:45:27.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:28.331 [print] {
"resourceType": "Procedure",
"id": "21226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:30.891+02:00",
"source": "#6QJ4K8FFwYWYBWYp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:28.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:29.578 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:32.156+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:32.156+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:29.579 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:30.204 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:30.204 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z30SIUhPCQH9zKqd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21227/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:30.204 [print] {
"resourceType": "Procedure",
"id": "21227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:33.392+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:45:30.204 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:30.205 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:30.205 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z30SIUhPCQH9zKqd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21227/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:30.205 [print] {
"resourceType": "Procedure",
"id": "21227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:33.392+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:45:30.205 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:30.862 [print] {
"resourceType": "Procedure",
"id": "21227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:33.392+02:00",
"source": "#Z30SIUhPCQH9zKqd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:31.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:32.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:34.671+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:34.671+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:32.081 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:32.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:32.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1k9y4RuFvf0FYF2I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21228/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:32.691 [print] {
"resourceType": "Procedure",
"id": "21228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:35.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:45:32.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:32.693 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:32.693 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1k9y4RuFvf0FYF2I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21228/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:32.693 [print] {
"resourceType": "Procedure",
"id": "21228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:35.885+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:45:32.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:33.295 [print] {
"resourceType": "Procedure",
"id": "21228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:35.885+02:00",
"source": "#1k9y4RuFvf0FYF2I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:33.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:34.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:37.104+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:37.104+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:34.542 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:35.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:35.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VghpurL07TTRqJYd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21229/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:35.186 [print] {
"resourceType": "Procedure",
"id": "21229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:38.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:45:35.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:35.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:35.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VghpurL07TTRqJYd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21229/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:35.188 [print] {
"resourceType": "Procedure",
"id": "21229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:38.375+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:45:35.188 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:35.807 [print] {
"resourceType": "Procedure",
"id": "21229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:38.375+02:00",
"source": "#VghpurL07TTRqJYd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:36.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:37.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:39.610+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:39.610+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:37.016 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:37.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:37.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j34xksKCbVoWDQYu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21230/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:37.626 [print] {
"resourceType": "Procedure",
"id": "21230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:40.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:45:37.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:37.627 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:37.627 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j34xksKCbVoWDQYu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21230/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:37.627 [print] {
"resourceType": "Procedure",
"id": "21230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:40.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:45:37.627 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:38.220 [print] {
"resourceType": "Procedure",
"id": "21230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:40.818+02:00",
"source": "#j34xksKCbVoWDQYu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:38.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:39.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:42.016+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:42.016+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:39.424 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:40.016 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:40.016 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NriVb31PGSC0iXpL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21231/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:40.017 [print] {
"resourceType": "Procedure",
"id": "21231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:43.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:45:40.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:40.018 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:40.018 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NriVb31PGSC0iXpL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21231/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:40.018 [print] {
"resourceType": "Procedure",
"id": "21231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:43.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:45:40.018 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:40.615 [print] {
"resourceType": "Procedure",
"id": "21231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:43.211+02:00",
"source": "#NriVb31PGSC0iXpL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:42.243 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:42.841 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:45.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:45.441+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:42.842 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:43.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:43.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DseKviuZA5rlzebH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21232/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:43.451 [print] {
"resourceType": "Procedure",
"id": "21232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:46.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:45:43.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:43.453 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:43.453 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DseKviuZA5rlzebH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21232/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:43.453 [print] {
"resourceType": "Procedure",
"id": "21232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:46.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
> *
print COOKIES
11:45:43.453 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:44.050 [print] {
"resourceType": "Procedure",
"id": "21232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:46.635+02:00",
"source": "#DseKviuZA5rlzebH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:45.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:46.579 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:49.143+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:49.143+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:46.580 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:47.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:47.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F1qxuhVUoAZUOZbb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21233/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:47.187 [print] {
"resourceType": "Procedure",
"id": "21233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:50.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:45:47.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:47.189 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:47.189 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F1qxuhVUoAZUOZbb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21233/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:47.189 [print] {
"resourceType": "Procedure",
"id": "21233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:50.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:45:47.189 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:47.831 [print] {
"resourceType": "Procedure",
"id": "21233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:50.383+02:00",
"source": "#F1qxuhVUoAZUOZbb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:48.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:49.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:51.636+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:51.636+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:49.044 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:49.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:49.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DB9fNwfbSCha23Q9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21234/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:49.653 [print] {
"resourceType": "Procedure",
"id": "21234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:52.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:45:49.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:49.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:49.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DB9fNwfbSCha23Q9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21234/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:49.654 [print] {
"resourceType": "Procedure",
"id": "21234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:52.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
> *
print COOKIES
11:45:49.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:50.254 [print] {
"resourceType": "Procedure",
"id": "21234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:52.845+02:00",
"source": "#DB9fNwfbSCha23Q9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-03-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:50.876 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:51.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:54.072+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:54.072+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:51.488 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:52.150 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:52.150 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VQwuhhGS9nyk3Rd6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21235/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:52.150 [print] {
"resourceType": "Procedure",
"id": "21235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:55.325+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:45:52.150 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:52.152 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:52.152 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VQwuhhGS9nyk3Rd6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21235/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:52.152 [print] {
"resourceType": "Procedure",
"id": "21235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:55.325+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:45:52.152 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:52.812 [print] {
"resourceType": "Procedure",
"id": "21235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:55.325+02:00",
"source": "#VQwuhhGS9nyk3Rd6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:53.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 20ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 20ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:54.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:56.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:56.630+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:54.046 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:54.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:54.940 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eLzwTzajuxIEfzY6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21236/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:54.940 [print] {
"resourceType": "Procedure",
"id": "21236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:58.125+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:45:54.940 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:54.941 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:54.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eLzwTzajuxIEfzY6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21236/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:45:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:45:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:54.941 [print] {
"resourceType": "Procedure",
"id": "21236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:58.125+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:45:54.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:55.559 [print] {
"resourceType": "Procedure",
"id": "21236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:45:58.125+02:00",
"source": "#eLzwTzajuxIEfzY6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:56.182 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:56.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:45:59.377+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:45:59.377+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:56.835 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:57.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:57.475 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QXn40n2cIIxbbuWG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21237/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:57.475 [print] {
"resourceType": "Procedure",
"id": "21237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:00.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:45:57.475 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:57.476 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:57.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QXn40n2cIIxbbuWG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21237/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:57.476 [print] {
"resourceType": "Procedure",
"id": "21237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:00.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:45:57.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:45:58.088 [print] {
"resourceType": "Procedure",
"id": "21237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:00.667+02:00",
"source": "#QXn40n2cIIxbbuWG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:45:58.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:45:59.325 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:01.897+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:01.897+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:45:59.326 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:59.947 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:59.947 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RqmZHdCOJ9fSnZbx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21238/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:59.947 [print] {
"resourceType": "Procedure",
"id": "21238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:03.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:45:59.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:45:59.949 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:45:59.949 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RqmZHdCOJ9fSnZbx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21238/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:45:59.949 [print] {
"resourceType": "Procedure",
"id": "21238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:03.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:45:59.949 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:00.551 [print] {
"resourceType": "Procedure",
"id": "21238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:03.142+02:00",
"source": "#RqmZHdCOJ9fSnZbx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:01.169 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:01.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:04.361+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:04.361+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:01.841 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:02.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:02.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XGPJeB9zejltNLQ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21239/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:02.435 [print] {
"resourceType": "Procedure",
"id": "21239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:05.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:46:02.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:02.436 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:02.436 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XGPJeB9zejltNLQ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21239/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:02.436 [print] {
"resourceType": "Procedure",
"id": "21239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:05.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:46:02.436 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:03.033 [print] {
"resourceType": "Procedure",
"id": "21239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:05.632+02:00",
"source": "#XGPJeB9zejltNLQ4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:04.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:05.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:08.043+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:08.043+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:05.453 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:06.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:06.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ODB4PHv9ewIggZAt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21240/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:06.070 [print] {
"resourceType": "Procedure",
"id": "21240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:09.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:46:06.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:06.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:06.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ODB4PHv9ewIggZAt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21240/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:06.071 [print] {
"resourceType": "Procedure",
"id": "21240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:09.256+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
> *
print COOKIES
11:46:06.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:06.736 [print] {
"resourceType": "Procedure",
"id": "21240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:09.256+02:00",
"source": "#ODB4PHv9ewIggZAt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-04-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:07.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:07.993 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:10.564+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:10.564+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:07.995 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:09.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:09.615 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g2n2blOztKMtsj47"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21241/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:09.615 [print] {
"resourceType": "Procedure",
"id": "21241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:12.807+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:46:09.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:09.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:09.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"g2n2blOztKMtsj47"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21241/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:09.617 [print] {
"resourceType": "Procedure",
"id": "21241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:12.807+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:46:09.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:10.285 [print] {
"resourceType": "Procedure",
"id": "21241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:12.807+02:00",
"source": "#g2n2blOztKMtsj47",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:10.928 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:11.541 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:14.122+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:14.122+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:11.542 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:12.232 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:12.232 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X6Qy9dUkTZYsQsVD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21242/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:12.232 [print] {
"resourceType": "Procedure",
"id": "21242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:15.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:46:12.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:12.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:12.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X6Qy9dUkTZYsQsVD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21242/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:12.233 [print] {
"resourceType": "Procedure",
"id": "21242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:15.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:46:12.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:12.817 [print] {
"resourceType": "Procedure",
"id": "21242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:15.414+02:00",
"source": "#X6Qy9dUkTZYsQsVD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:13.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:14.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:16.648+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:16.648+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:14.072 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:14.780 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:14.780 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bxkNQd6Yg6Qr8odk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21243/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:14.780 [print] {
"resourceType": "Procedure",
"id": "21243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:17.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:46:14.780 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:14.781 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:14.781 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bxkNQd6Yg6Qr8odk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21243/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:14.781 [print] {
"resourceType": "Procedure",
"id": "21243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:17.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:46:14.781 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:16.417 [print] {
"resourceType": "Procedure",
"id": "21243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:17.974+02:00",
"source": "#bxkNQd6Yg6Qr8odk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:17.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:17.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:20.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:20.227+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:17.673 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:18.300 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:18.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6sJuhop87S9Pa8FA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21244/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:18.301 [print] {
"resourceType": "Procedure",
"id": "21244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:21.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:46:18.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:18.302 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:18.302 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6sJuhop87S9Pa8FA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21244/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:18.302 [print] {
"resourceType": "Procedure",
"id": "21244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:21.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
> *
print COOKIES
11:46:18.302 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:18.890 [print] {
"resourceType": "Procedure",
"id": "21244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:21.489+02:00",
"source": "#6sJuhop87S9Pa8FA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-06-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:19.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:20.137 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:22.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:22.704+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:20.139 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:20.790 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:20.790 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RJqNSyP8TKv8KGzQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21245/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:20.790 [print] {
"resourceType": "Procedure",
"id": "21245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:23.957+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:46:20.790 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:20.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:20.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RJqNSyP8TKv8KGzQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21245/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:20.791 [print] {
"resourceType": "Procedure",
"id": "21245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:23.957+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:46:20.791 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:21.402 [print] {
"resourceType": "Procedure",
"id": "21245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:23.957+02:00",
"source": "#RJqNSyP8TKv8KGzQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:22.031 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:22.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:25.223+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:25.223+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:22.656 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:23.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:23.279 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r5iIsFBD9EitmhQb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21246/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:23.279 [print] {
"resourceType": "Procedure",
"id": "21246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:26.468+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:46:23.279 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:23.280 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:23.280 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"r5iIsFBD9EitmhQb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21246/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:23.280 [print] {
"resourceType": "Procedure",
"id": "21246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:26.468+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
> *
print COOKIES
11:46:23.280 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:24.106 [print] {
"resourceType": "Procedure",
"id": "21246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:26.468+02:00",
"source": "#r5iIsFBD9EitmhQb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-09-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:24.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:25.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:28.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:28.109+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:25.528 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:26.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:26.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5xLFYBtX11uf7ib0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21247/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:26.173 [print] {
"resourceType": "Procedure",
"id": "21247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:29.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:46:26.174 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:26.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:26.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5xLFYBtX11uf7ib0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21247/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:26.175 [print] {
"resourceType": "Procedure",
"id": "21247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:29.345+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:46:26.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:26.822 [print] {
"resourceType": "Procedure",
"id": "21247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:29.345+02:00",
"source": "#5xLFYBtX11uf7ib0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:29.043 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:29.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:32.240+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:32.240+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:29.657 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:30.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:30.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WZYuCaXv1niZrPHc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21248/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:30.275 [print] {
"resourceType": "Procedure",
"id": "21248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:33.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:46:30.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:30.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:30.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WZYuCaXv1niZrPHc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21248/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:30.276 [print] {
"resourceType": "Procedure",
"id": "21248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:33.464+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:46:30.276 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:30.867 [print] {
"resourceType": "Procedure",
"id": "21248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:33.464+02:00",
"source": "#WZYuCaXv1niZrPHc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:31.474 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:32.124 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:34.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:34.665+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:32.125 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:32.743 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:32.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kLyNdHTkN5flv0xI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21249/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:32.744 [print] {
"resourceType": "Procedure",
"id": "21249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:35.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:46:32.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:32.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:32.745 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kLyNdHTkN5flv0xI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21249/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:32.745 [print] {
"resourceType": "Procedure",
"id": "21249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:35.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
> *
print COOKIES
11:46:32.745 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:33.364 [print] {
"resourceType": "Procedure",
"id": "21249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:35.930+02:00",
"source": "#kLyNdHTkN5flv0xI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-12-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:34.004 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:34.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:37.196+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:37.196+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:34.629 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:36.262 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:36.262 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1mzSRQbFNpCdYy0K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21250/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:36.262 [print] {
"resourceType": "Procedure",
"id": "21250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:39.444+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:46:36.262 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:36.264 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:36.264 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1mzSRQbFNpCdYy0K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21250/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:36.264 [print] {
"resourceType": "Procedure",
"id": "21250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:39.444+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
> *
print COOKIES
11:46:36.264 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:36.897 [print] {
"resourceType": "Procedure",
"id": "21250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:39.444+02:00",
"source": "#1mzSRQbFNpCdYy0K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-05-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:37.511 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:38.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:40.707+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:40.707+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:38.105 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:38.778 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:38.778 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CHyUA8qOkOuyzfw2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21251/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:38.778 [print] {
"resourceType": "Procedure",
"id": "21251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:41.916+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:46:38.778 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:38.779 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:38.779 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CHyUA8qOkOuyzfw2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21251/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:38.779 [print] {
"resourceType": "Procedure",
"id": "21251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:41.916+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:46:38.779 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:39.369 [print] {
"resourceType": "Procedure",
"id": "21251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:41.916+02:00",
"source": "#CHyUA8qOkOuyzfw2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:39.982 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:40.813 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:43.160+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:43.160+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:40.814 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:41.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:41.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aLwunpZbNubtQqWU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21252/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:41.464 [print] {
"resourceType": "Procedure",
"id": "21252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:44.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:46:41.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:41.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:41.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aLwunpZbNubtQqWU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21252/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:41.466 [print] {
"resourceType": "Procedure",
"id": "21252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:44.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:46:41.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:42.079 [print] {
"resourceType": "Procedure",
"id": "21252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:44.635+02:00",
"source": "#aLwunpZbNubtQqWU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:42.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:43.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:46.166+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:46.166+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:43.588 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:44.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:44.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ITR8RaHBMstvStL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21253/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:44.248 [print] {
"resourceType": "Procedure",
"id": "21253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:47.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:46:44.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:44.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:44.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8ITR8RaHBMstvStL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21253/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:44.249 [print] {
"resourceType": "Procedure",
"id": "21253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:47.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:46:44.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:44.840 [print] {
"resourceType": "Procedure",
"id": "21253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:47.441+02:00",
"source": "#8ITR8RaHBMstvStL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:45.492 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:46.105 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:48.657+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:48.657+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:46.106 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:48.375 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:48.375 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K8haMeAL78RRMaBm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21254/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:48.375 [print] {
"resourceType": "Procedure",
"id": "21254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:51.343+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:46:48.375 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:48.377 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:48.377 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K8haMeAL78RRMaBm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21254/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:48.377 [print] {
"resourceType": "Procedure",
"id": "21254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:51.343+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
> *
print COOKIES
11:46:48.377 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:49.185 [print] {
"resourceType": "Procedure",
"id": "21254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:51.343+02:00",
"source": "#K8haMeAL78RRMaBm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:49.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:50.431 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:53.008+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:53.008+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:50.433 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:51.086 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:51.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nmWf9P2AQXuGREhT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21255/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:51.086 [print] {
"resourceType": "Procedure",
"id": "21255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:54.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:46:51.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:51.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:51.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nmWf9P2AQXuGREhT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21255/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:51.087 [print] {
"resourceType": "Procedure",
"id": "21255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:54.276+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
> *
print COOKIES
11:46:51.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:51.696 [print] {
"resourceType": "Procedure",
"id": "21255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:54.276+02:00",
"source": "#nmWf9P2AQXuGREhT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:52.322 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:52.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:55.517+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:55.517+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:52.930 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:53.531 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:53.531 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ty8YenrXnpncG8UH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21256/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:53.531 [print] {
"resourceType": "Procedure",
"id": "21256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:56.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:46:53.531 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:53.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:53.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ty8YenrXnpncG8UH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21256/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:46:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:53.532 [print] {
"resourceType": "Procedure",
"id": "21256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:56.727+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
> *
print COOKIES
11:46:53.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:54.168 [print] {
"resourceType": "Procedure",
"id": "21256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:46:56.727+02:00",
"source": "#Ty8YenrXnpncG8UH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-10"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:54.791 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:56.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:46:57.974+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:46:57.974+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:56.414 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:57.031 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:57.031 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WAlWuXCnBugZ4zL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21257/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:57.031 [print] {
"resourceType": "Procedure",
"id": "21257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:00.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:46:57.031 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:57.033 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:57.033 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7WAlWuXCnBugZ4zL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21257/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:46:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:57.033 [print] {
"resourceType": "Procedure",
"id": "21257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:00.216+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
> *
print COOKIES
11:46:57.033 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:46:57.693 [print] {
"resourceType": "Procedure",
"id": "21257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:00.216+02:00",
"source": "#7WAlWuXCnBugZ4zL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:46:58.327 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:46:58.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:01.520+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:01.520+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:46:58.930 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:59.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:59.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOPiMtkFI8QWIpBH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21258/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:59.549 [print] {
"resourceType": "Procedure",
"id": "21258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:02.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:46:59.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:46:59.550 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:46:59.550 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tOPiMtkFI8QWIpBH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21258/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:46:59.550 [print] {
"resourceType": "Procedure",
"id": "21258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:02.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:46:59.550 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:00.150 [print] {
"resourceType": "Procedure",
"id": "21258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:02.742+02:00",
"source": "#tOPiMtkFI8QWIpBH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:00.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:01.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:04.089+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:04.089+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:01.533 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:02.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:02.139 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eemuKBldXCXB3tN9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21259/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:02.139 [print] {
"resourceType": "Procedure",
"id": "21259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:05.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:47:02.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:02.140 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:02.140 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eemuKBldXCXB3tN9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21259/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:02.140 [print] {
"resourceType": "Procedure",
"id": "21259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:05.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
> *
print COOKIES
11:47:02.140 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:02.759 [print] {
"resourceType": "Procedure",
"id": "21259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:05.333+02:00",
"source": "#eemuKBldXCXB3tN9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:03.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:03.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:06.559+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:06.559+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:03.984 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:04.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:04.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"11wuxG0XBLQRk4We"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21260/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:04.581 [print] {
"resourceType": "Procedure",
"id": "21260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:07.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:47:04.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:04.582 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:04.583 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"11wuxG0XBLQRk4We"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21260/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:04.583 [print] {
"resourceType": "Procedure",
"id": "21260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:07.774+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:47:04.583 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:05.200 [print] {
"resourceType": "Procedure",
"id": "21260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:07.774+02:00",
"source": "#11wuxG0XBLQRk4We",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:05.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:06.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:09.049+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:09.049+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:06.461 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:07.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:07.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RhJov885M39u3BsY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21261/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:07.069 [print] {
"resourceType": "Procedure",
"id": "21261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:10.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:47:07.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:07.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:07.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RhJov885M39u3BsY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21261/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:07.070 [print] {
"resourceType": "Procedure",
"id": "21261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:10.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
> *
print COOKIES
11:47:07.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:07.669 [print] {
"resourceType": "Procedure",
"id": "21261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:10.264+02:00",
"source": "#RhJov885M39u3BsY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-03-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:08.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:08.892 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:11.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:11.480+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:08.892 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:09.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:09.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FwgMQHyD6qRFux5s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21262/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:09.518 [print] {
"resourceType": "Procedure",
"id": "21262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:12.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:47:09.518 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:09.519 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:09.519 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FwgMQHyD6qRFux5s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21262/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:09.519 [print] {
"resourceType": "Procedure",
"id": "21262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:12.699+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
> *
print COOKIES
11:47:09.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:10.115 [print] {
"resourceType": "Procedure",
"id": "21262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:12.699+02:00",
"source": "#FwgMQHyD6qRFux5s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-01-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:10.747 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:11.385 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:13.944+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:13.944+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:11.386 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:12.022 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:12.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YLWFTx55REuaYIvE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21263/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:12.023 [print] {
"resourceType": "Procedure",
"id": "21263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:15.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:47:12.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:12.024 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:12.024 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YLWFTx55REuaYIvE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21263/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:12.024 [print] {
"resourceType": "Procedure",
"id": "21263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:15.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:47:12.024 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:12.634 [print] {
"resourceType": "Procedure",
"id": "21263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:15.211+02:00",
"source": "#YLWFTx55REuaYIvE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:13.536 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:14.168 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:16.726+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:16.726+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:14.169 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:14.980 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:14.980 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3zEI2IgOCpcdwSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21264/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:14.980 [print] {
"resourceType": "Procedure",
"id": "21264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:18.167+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:47:14.980 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:14.981 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:14.981 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"K3zEI2IgOCpcdwSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21264/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:14.981 [print] {
"resourceType": "Procedure",
"id": "21264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:18.167+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:47:14.981 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:15.614 [print] {
"resourceType": "Procedure",
"id": "21264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:18.167+02:00",
"source": "#K3zEI2IgOCpcdwSz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:16.242 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:16.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:19.435+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:19.435+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:16.910 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:17.508 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:17.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtL3f9KvdLKS6wJ2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21265/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:17.508 [print] {
"resourceType": "Procedure",
"id": "21265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:20.704+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:47:17.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:17.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:17.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DtL3f9KvdLKS6wJ2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21265/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:17.509 [print] {
"resourceType": "Procedure",
"id": "21265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:20.704+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
> *
print COOKIES
11:47:17.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:18.125 [print] {
"resourceType": "Procedure",
"id": "21265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:20.704+02:00",
"source": "#DtL3f9KvdLKS6wJ2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:18.730 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:19.338 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:21.920+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:21.920+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:19.340 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:19.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:19.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qugKaJM1b1aSfNDR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21266/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:19.967 [print] {
"resourceType": "Procedure",
"id": "21266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:23.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:47:19.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:19.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:19.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qugKaJM1b1aSfNDR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21266/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:19.969 [print] {
"resourceType": "Procedure",
"id": "21266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:23.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:47:19.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:20.842 [print] {
"resourceType": "Procedure",
"id": "21266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:23.159+02:00",
"source": "#qugKaJM1b1aSfNDR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:21.473 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:23.078 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:24.650+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:24.650+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:23.080 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:23.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:23.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jqc6TrgFvBX0rEg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21267/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:23.696 [print] {
"resourceType": "Procedure",
"id": "21267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:26.882+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:47:23.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:23.698 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:23.698 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jqc6TrgFvBX0rEg1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21267/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:23.698 [print] {
"resourceType": "Procedure",
"id": "21267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:26.882+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
> *
print COOKIES
11:47:23.698 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:24.289 [print] {
"resourceType": "Procedure",
"id": "21267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:26.882+02:00",
"source": "#jqc6TrgFvBX0rEg1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-06-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:24.933 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:25.548 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:28.127+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:28.127+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:25.549 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:26.182 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:26.182 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JiIvlHlWDaU9E9nd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21268/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:26.182 [print] {
"resourceType": "Procedure",
"id": "21268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:29.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:47:26.182 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:26.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:26.184 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JiIvlHlWDaU9E9nd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21268/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:26.184 [print] {
"resourceType": "Procedure",
"id": "21268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:29.376+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
> *
print COOKIES
11:47:26.184 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:26.792 [print] {
"resourceType": "Procedure",
"id": "21268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:29.376+02:00",
"source": "#JiIvlHlWDaU9E9nd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-02-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:27.423 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:28.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:30.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:30.609+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:28.029 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:28.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:28.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"72zM9DyroB03PCU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21269/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:28.630 [print] {
"resourceType": "Procedure",
"id": "21269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:31.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:47:28.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:28.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:28.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"72zM9DyroB03PCU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21269/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:28.631 [print] {
"resourceType": "Procedure",
"id": "21269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:31.815+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
> *
print COOKIES
11:47:28.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:29.236 [print] {
"resourceType": "Procedure",
"id": "21269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:31.815+02:00",
"source": "#72zM9DyroB03PCU4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-07-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:29.860 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:30.473 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:33.046+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:33.046+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:30.475 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:31.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:31.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NE2M2ZxQrG7cDeSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21270/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:31.122 [print] {
"resourceType": "Procedure",
"id": "21270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:34.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:47:31.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:31.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:31.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NE2M2ZxQrG7cDeSz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21270/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:31.123 [print] {
"resourceType": "Procedure",
"id": "21270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:34.310+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:47:31.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:31.733 [print] {
"resourceType": "Procedure",
"id": "21270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:34.310+02:00",
"source": "#NE2M2ZxQrG7cDeSz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:32.434 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:33.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:35.616+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:35.616+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:33.052 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:33.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:33.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qUXrXD9oKrCwnOQz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21271/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:33.676 [print] {
"resourceType": "Procedure",
"id": "21271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:36.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:47:33.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:33.677 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:33.677 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qUXrXD9oKrCwnOQz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21271/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:33.677 [print] {
"resourceType": "Procedure",
"id": "21271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:36.862+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
> *
print COOKIES
11:47:33.677 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:34.294 [print] {
"resourceType": "Procedure",
"id": "21271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:36.862+02:00",
"source": "#qUXrXD9oKrCwnOQz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2013-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:34.927 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:35.612 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:38.123+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:38.123+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:35.614 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:36.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:36.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w3I3cVaE0g9sSTNO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21272/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:36.227 [print] {
"resourceType": "Procedure",
"id": "21272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:39.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:47:36.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:36.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:36.228 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w3I3cVaE0g9sSTNO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21272/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:36.229 [print] {
"resourceType": "Procedure",
"id": "21272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:39.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
> *
print COOKIES
11:47:36.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:36.858 [print] {
"resourceType": "Procedure",
"id": "21272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:39.417+02:00",
"source": "#w3I3cVaE0g9sSTNO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-07-15"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:37.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:38.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:40.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:40.665+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:38.083 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:38.712 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:38.712 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hGwxq1Wo3StmIRsl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21273/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:38.712 [print] {
"resourceType": "Procedure",
"id": "21273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:41.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:47:38.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:38.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:38.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hGwxq1Wo3StmIRsl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21273/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:38.713 [print] {
"resourceType": "Procedure",
"id": "21273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:41.891+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:47:38.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:39.394 [print] {
"resourceType": "Procedure",
"id": "21273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:41.891+02:00",
"source": "#hGwxq1Wo3StmIRsl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:39.994 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:40.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:43.190+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:43.190+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:40.621 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:41.224 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:41.224 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HtphYsOaZ0WwT3aD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21274/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:41.224 [print] {
"resourceType": "Procedure",
"id": "21274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:44.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:47:41.224 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:41.225 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:41.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HtphYsOaZ0WwT3aD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21274/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:41.226 [print] {
"resourceType": "Procedure",
"id": "21274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:44.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
> *
print COOKIES
11:47:41.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:41.818 [print] {
"resourceType": "Procedure",
"id": "21274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:44.417+02:00",
"source": "#HtphYsOaZ0WwT3aD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:42.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:43.119 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:45.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:45.628+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:43.120 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:43.723 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:43.723 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nR8htWyCMSyG6a76"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21275/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:43.723 [print] {
"resourceType": "Procedure",
"id": "21275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:46.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:47:43.723 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:43.724 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:43.724 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nR8htWyCMSyG6a76"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21275/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:43.724 [print] {
"resourceType": "Procedure",
"id": "21275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:46.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
> *
print COOKIES
11:47:43.724 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:44.350 [print] {
"resourceType": "Procedure",
"id": "21275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:46.912+02:00",
"source": "#nR8htWyCMSyG6a76",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-10-14"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:44.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:45.589 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:48.157+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:48.157+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:45.590 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:46.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:46.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yAWcvq4C29ctl0Dy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21276/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:46.229 [print] {
"resourceType": "Procedure",
"id": "21276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:49.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:47:46.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:46.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:46.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yAWcvq4C29ctl0Dy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21276/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:46.230 [print] {
"resourceType": "Procedure",
"id": "21276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:49.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
> *
print COOKIES
11:47:46.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:46.821 [print] {
"resourceType": "Procedure",
"id": "21276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:49.419+02:00",
"source": "#yAWcvq4C29ctl0Dy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-11-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:48.460 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:49.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:51.643+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:51.643+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:49.088 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:49.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:49.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAVAoQDjEKEylgXB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21277/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:49.697 [print] {
"resourceType": "Procedure",
"id": "21277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:52.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:47:49.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:49.699 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:49.699 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAVAoQDjEKEylgXB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21277/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:49.699 [print] {
"resourceType": "Procedure",
"id": "21277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:52.887+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:47:49.699 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:50.302 [print] {
"resourceType": "Procedure",
"id": "21277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:52.887+02:00",
"source": "#wAVAoQDjEKEylgXB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:50.930 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:51.529 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:54.125+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:54.125+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:51.530 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:52.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:52.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fd7NnslMhbgtKFQK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21278/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:52.143 [print] {
"resourceType": "Procedure",
"id": "21278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:55.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:47:52.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:52.144 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:52.144 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fd7NnslMhbgtKFQK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21278/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:52.144 [print] {
"resourceType": "Procedure",
"id": "21278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:55.339+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:47:52.144 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:52.766 [print] {
"resourceType": "Procedure",
"id": "21278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:55.339+02:00",
"source": "#fd7NnslMhbgtKFQK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:53.393 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:54.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:56.570+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:56.570+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:54.009 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:54.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:54.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Csv1mmKZXspxCOll"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21279/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:54.632 [print] {
"resourceType": "Procedure",
"id": "21279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:57.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:47:54.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:54.633 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:54.633 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Csv1mmKZXspxCOll"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21279/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:47:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:54.633 [print] {
"resourceType": "Procedure",
"id": "21279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:57.823+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
> *
print COOKIES
11:47:54.633 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:55.436 [print] {
"resourceType": "Procedure",
"id": "21279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:47:57.823+02:00",
"source": "#Csv1mmKZXspxCOll",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:56.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:56.660 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:47:59.233+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:47:59.233+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:56.661 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:57.281 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:57.281 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pn4pYdsAI6V79CQi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21280/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:57.281 [print] {
"resourceType": "Procedure",
"id": "21280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:00.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:47:57.281 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:57.282 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:57.282 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pn4pYdsAI6V79CQi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21280/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:57.282 [print] {
"resourceType": "Procedure",
"id": "21280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:00.465+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:47:57.282 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:47:57.901 [print] {
"resourceType": "Procedure",
"id": "21280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:00.465+02:00",
"source": "#pn4pYdsAI6V79CQi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:47:58.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:47:59.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:01.709+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:01.709+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:47:59.138 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:59.739 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:59.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AtB6yf1v8SPQpOLb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21281/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:59.739 [print] {
"resourceType": "Procedure",
"id": "21281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:02.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:47:59.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:47:59.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:47:59.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AtB6yf1v8SPQpOLb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21281/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:47:59.741 [print] {
"resourceType": "Procedure",
"id": "21281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:02.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
> *
print COOKIES
11:47:59.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:00.348 [print] {
"resourceType": "Procedure",
"id": "21281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:02.933+02:00",
"source": "#AtB6yf1v8SPQpOLb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:00.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:01.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:04.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:04.151+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:01.576 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:02.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:02.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RQZ67bTGeMZksU9r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21282/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:02.201 [print] {
"resourceType": "Procedure",
"id": "21282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:05.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:48:02.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:02.203 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:02.203 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RQZ67bTGeMZksU9r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21282/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:02.203 [print] {
"resourceType": "Procedure",
"id": "21282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:05.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:48:02.203 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:02.825 [print] {
"resourceType": "Procedure",
"id": "21282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:05.371+02:00",
"source": "#RQZ67bTGeMZksU9r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:03.446 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:04.093 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:06.624+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:06.624+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:04.094 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:04.736 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:04.736 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enBOs9KplQnI0gnn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21283/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:04.736 [print] {
"resourceType": "Procedure",
"id": "21283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:07.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:48:04.736 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:04.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:04.738 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enBOs9KplQnI0gnn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21283/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:04.738 [print] {
"resourceType": "Procedure",
"id": "21283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:07.924+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:48:04.738 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:05.354 [print] {
"resourceType": "Procedure",
"id": "21283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:07.924+02:00",
"source": "#enBOs9KplQnI0gnn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:06.017 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:06.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:09.206+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:09.206+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:06.619 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:07.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:07.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IssLrrVgzG6IN4Zd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21284/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:07.255 [print] {
"resourceType": "Procedure",
"id": "21284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:10.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:48:07.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:07.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:07.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IssLrrVgzG6IN4Zd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21284/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:07.257 [print] {
"resourceType": "Procedure",
"id": "21284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:10.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
> *
print COOKIES
11:48:07.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:07.867 [print] {
"resourceType": "Procedure",
"id": "21284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:10.441+02:00",
"source": "#IssLrrVgzG6IN4Zd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-12"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:08.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:09.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:11.669+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:11.669+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:09.085 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:09.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:09.707 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Voa1ZWGJVad9JT7K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21285/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:09.707 [print] {
"resourceType": "Procedure",
"id": "21285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:12.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:48:09.707 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:09.708 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:09.708 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Voa1ZWGJVad9JT7K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21285/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:09.708 [print] {
"resourceType": "Procedure",
"id": "21285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:12.894+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:48:09.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:10.341 [print] {
"resourceType": "Procedure",
"id": "21285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:12.894+02:00",
"source": "#Voa1ZWGJVad9JT7K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:10.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:11.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:14.160+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:14.160+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:11.585 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:12.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:12.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nANMo6aBbgTd1xFt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21286/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:12.230 [print] {
"resourceType": "Procedure",
"id": "21286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:15.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:48:12.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:12.231 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:12.231 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nANMo6aBbgTd1xFt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21286/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:12.231 [print] {
"resourceType": "Procedure",
"id": "21286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:15.417+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
> *
print COOKIES
11:48:12.231 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:13.861 [print] {
"resourceType": "Procedure",
"id": "21286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:15.417+02:00",
"source": "#nANMo6aBbgTd1xFt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:14.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:15.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:17.672+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:17.672+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:15.143 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:15.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:15.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B31QI4zGHluHlXda"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21287/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:15.787 [print] {
"resourceType": "Procedure",
"id": "21287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:18.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:48:15.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:15.788 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:15.788 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B31QI4zGHluHlXda"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21287/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:15.788 [print] {
"resourceType": "Procedure",
"id": "21287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:18.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:48:15.788 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:16.416 [print] {
"resourceType": "Procedure",
"id": "21287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:18.970+02:00",
"source": "#B31QI4zGHluHlXda",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:17.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:17.639 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:20.238+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:20.238+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:17.640 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:18.252 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:18.252 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LY00pgbIQIhS3rtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21288/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:18.252 [print] {
"resourceType": "Procedure",
"id": "21288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:21.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:48:18.252 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:18.254 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:18.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LY00pgbIQIhS3rtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21288/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:18.254 [print] {
"resourceType": "Procedure",
"id": "21288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:21.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:48:18.254 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:18.850 [print] {
"resourceType": "Procedure",
"id": "21288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:21.441+02:00",
"source": "#LY00pgbIQIhS3rtG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:19.464 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:20.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:22.647+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:22.647+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:20.090 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:20.709 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:20.709 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"13ddYK7Jur50wemv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21289/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:20.709 [print] {
"resourceType": "Procedure",
"id": "21289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:23.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:48:20.709 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:20.710 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:20.710 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"13ddYK7Jur50wemv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21289/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:20.710 [print] {
"resourceType": "Procedure",
"id": "21289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:23.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
> *
print COOKIES
11:48:20.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:21.315 [print] {
"resourceType": "Procedure",
"id": "21289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:23.903+02:00",
"source": "#13ddYK7Jur50wemv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-11-27"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:21.918 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:22.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:25.112+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:25.112+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:22.515 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:23.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:23.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZWhfYmQnQHSzmgzR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21290/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:23.107 [print] {
"resourceType": "Procedure",
"id": "21290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:26.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:48:23.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:23.109 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:23.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZWhfYmQnQHSzmgzR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21290/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:23.109 [print] {
"resourceType": "Procedure",
"id": "21290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:26.304+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
> *
print COOKIES
11:48:23.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:23.725 [print] {
"resourceType": "Procedure",
"id": "21290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:26.304+02:00",
"source": "#ZWhfYmQnQHSzmgzR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2016-05-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:24.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:24.943 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:27.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:27.528+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:24.944 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:25.583 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:25.584 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mop1mPG6ZZBmAoOI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21291/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:25.584 [print] {
"resourceType": "Procedure",
"id": "21291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:28.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:48:25.584 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:25.585 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:25.585 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mop1mPG6ZZBmAoOI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21291/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:25.585 [print] {
"resourceType": "Procedure",
"id": "21291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:28.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
> *
print COOKIES
11:48:25.585 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:26.193 [print] {
"resourceType": "Procedure",
"id": "21291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:28.776+02:00",
"source": "#Mop1mPG6ZZBmAoOI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-04-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:26.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:27.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:30.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:30.002+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:27.426 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:28.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:28.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q1m8Ax2o3Q81ZxwZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21292/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:28.043 [print] {
"resourceType": "Procedure",
"id": "21292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:31.225+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:48:28.044 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:28.045 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:28.045 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q1m8Ax2o3Q81ZxwZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21292/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:28.045 [print] {
"resourceType": "Procedure",
"id": "21292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:31.225+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
> *
print COOKIES
11:48:28.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:28.645 [print] {
"resourceType": "Procedure",
"id": "21292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:31.225+02:00",
"source": "#Q1m8Ax2o3Q81ZxwZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:29.259 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:30.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:32.454+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:32.454+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:30.884 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:31.518 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:31.518 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sK2lpDb6HMCIZavw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21293/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:31.519 [print] {
"resourceType": "Procedure",
"id": "21293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:34.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:48:31.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:31.520 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:31.520 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sK2lpDb6HMCIZavw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21293/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:31.520 [print] {
"resourceType": "Procedure",
"id": "21293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:34.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
> *
print COOKIES
11:48:31.520 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:32.123 [print] {
"resourceType": "Procedure",
"id": "21293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:34.694+02:00",
"source": "#sK2lpDb6HMCIZavw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2012-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:32.730 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:33.907 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:35.919+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:35.919+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:33.909 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:34.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:34.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rZqoTkMXlA0YYVRc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21294/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:34.853 [print] {
"resourceType": "Procedure",
"id": "21294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:38.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:48:34.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:34.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:34.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rZqoTkMXlA0YYVRc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21294/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:34.854 [print] {
"resourceType": "Procedure",
"id": "21294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:38.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
> *
print COOKIES
11:48:34.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:35.515 [print] {
"resourceType": "Procedure",
"id": "21294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:38.037+02:00",
"source": "#rZqoTkMXlA0YYVRc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-07-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:36.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:36.762 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:39.344+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:39.344+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:36.762 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:37.391 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:37.391 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AIfakHOaEJ1J4KcM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21295/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:37.391 [print] {
"resourceType": "Procedure",
"id": "21295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:40.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:48:37.391 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:37.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:37.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AIfakHOaEJ1J4KcM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21295/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:37.394 [print] {
"resourceType": "Procedure",
"id": "21295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:40.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:48:37.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:38.010 [print] {
"resourceType": "Procedure",
"id": "21295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:40.577+02:00",
"source": "#AIfakHOaEJ1J4KcM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:38.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:39.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:41.824+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:41.824+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:39.349 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:39.957 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:39.957 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7TmSq2DsWxdcQ4R2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21296/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:39.957 [print] {
"resourceType": "Procedure",
"id": "21296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:43.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:48:39.957 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:39.958 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:39.958 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7TmSq2DsWxdcQ4R2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21296/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:39.958 [print] {
"resourceType": "Procedure",
"id": "21296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:43.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
> *
print COOKIES
11:48:39.958 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:40.546 [print] {
"resourceType": "Procedure",
"id": "21296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:43.151+02:00",
"source": "#7TmSq2DsWxdcQ4R2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:41.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:42.017 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:44.608+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:44.608+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:42.018 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:42.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:42.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Nan5BgnEsqATfHQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21297/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:42.641 [print] {
"resourceType": "Procedure",
"id": "21297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:45.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:48:42.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:42.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:42.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Nan5BgnEsqATfHQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21297/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:42.643 [print] {
"resourceType": "Procedure",
"id": "21297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:45.829+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:48:42.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:43.259 [print] {
"resourceType": "Procedure",
"id": "21297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:45.829+02:00",
"source": "#1Nan5BgnEsqATfHQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:43.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:44.570 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:47.150+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:47.150+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:44.571 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:45.199 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:45.199 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Kt731jvWs9DxdMJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21298/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:45.199 [print] {
"resourceType": "Procedure",
"id": "21298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:48.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:48:45.199 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:45.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:45.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Kt731jvWs9DxdMJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21298/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:45.201 [print] {
"resourceType": "Procedure",
"id": "21298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:48.382+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
> *
print COOKIES
11:48:45.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:45.845 [print] {
"resourceType": "Procedure",
"id": "21298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:48.382+02:00",
"source": "#9Kt731jvWs9DxdMJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-01-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:46.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:47.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:49.682+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:49.682+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:47.312 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:49.125 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:49.125 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyd3LR6pczkZc4ye"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21299/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:49.125 [print] {
"resourceType": "Procedure",
"id": "21299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:52.317+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:48:49.125 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:49.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:49.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oyd3LR6pczkZc4ye"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21299/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:49.126 [print] {
"resourceType": "Procedure",
"id": "21299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:52.317+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
> *
print COOKIES
11:48:49.127 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:49.747 [print] {
"resourceType": "Procedure",
"id": "21299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:52.317+02:00",
"source": "#oyd3LR6pczkZc4ye",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:50.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:50.969 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:53.550+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:53.550+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:50.971 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:51.560 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:51.560 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fmuaAYku0hHL4S23"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21300/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:51.560 [print] {
"resourceType": "Procedure",
"id": "21300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:54.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:48:51.560 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:51.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:51.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fmuaAYku0hHL4S23"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21300/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:51.565 [print] {
"resourceType": "Procedure",
"id": "21300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:54.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:48:51.565 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:52.217 [print] {
"resourceType": "Procedure",
"id": "21300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:54.752+02:00",
"source": "#fmuaAYku0hHL4S23",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:52.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:53.486 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:56.019+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:56.019+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:53.487 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:54.119 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:54.119 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JyEEHBgjNNtAXGmM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21301/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:54.119 [print] {
"resourceType": "Procedure",
"id": "21301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:57.297+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:48:54.119 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:54.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:54.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JyEEHBgjNNtAXGmM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21301/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:54.121 [print] {
"resourceType": "Procedure",
"id": "21301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:57.297+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
> *
print COOKIES
11:48:54.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:54.709 [print] {
"resourceType": "Procedure",
"id": "21301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:57.297+02:00",
"source": "#JyEEHBgjNNtAXGmM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-22"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:55.342 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:55.961 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:48:58.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:48:58.528+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:55.963 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:56.574 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:56.574 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lALBtpj9jstu7N8u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21302/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:56.574 [print] {
"resourceType": "Procedure",
"id": "21302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:59.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:48:56.574 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:56.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:56.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lALBtpj9jstu7N8u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21302/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:48:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:48:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:56.575 [print] {
"resourceType": "Procedure",
"id": "21302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:59.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
> *
print COOKIES
11:48:56.575 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:57.256 [print] {
"resourceType": "Procedure",
"id": "21302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:48:59.765+02:00",
"source": "#lALBtpj9jstu7N8u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-07-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:48:57.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 25ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 25ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:48:58.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:01.085+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:01.085+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:48:58.549 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:59.210 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:59.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OGW5hzxUSi3BBwUW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21303/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:59.211 [print] {
"resourceType": "Procedure",
"id": "21303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:02.373+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:48:59.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:48:59.212 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:48:59.212 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OGW5hzxUSi3BBwUW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21303/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:48:59.212 [print] {
"resourceType": "Procedure",
"id": "21303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:02.373+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
> *
print COOKIES
11:48:59.212 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:48:59.822 [print] {
"resourceType": "Procedure",
"id": "21303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:02.373+02:00",
"source": "#OGW5hzxUSi3BBwUW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-05-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:01.645 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:03.260 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:04.819+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:04.819+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:03.261 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:03.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:03.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXZoMvvvGtB9kVMy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21304/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:03.863 [print] {
"resourceType": "Procedure",
"id": "21304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:07.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:49:03.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:03.864 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:03.864 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXZoMvvvGtB9kVMy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21304/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:03.864 [print] {
"resourceType": "Procedure",
"id": "21304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:07.055+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
> *
print COOKIES
11:49:03.865 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:04.485 [print] {
"resourceType": "Procedure",
"id": "21304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:07.055+02:00",
"source": "#qXZoMvvvGtB9kVMy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-01-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:06.112 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:07.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:09.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:09.307+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:07.015 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:07.674 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:07.674 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KZdoZ3FOrIIJ6qed"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21305/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:07.674 [print] {
"resourceType": "Procedure",
"id": "21305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:10.861+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:49:07.674 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:07.676 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:07.676 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KZdoZ3FOrIIJ6qed"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21305/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:07.676 [print] {
"resourceType": "Procedure",
"id": "21305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:10.861+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:49:07.676 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:08.369 [print] {
"resourceType": "Procedure",
"id": "21305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:10.861+02:00",
"source": "#KZdoZ3FOrIIJ6qed",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:09.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:09.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:12.200+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:12.200+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:09.659 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:10.294 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:10.294 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ch53ToyP9J8epml1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21306/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:10.294 [print] {
"resourceType": "Procedure",
"id": "21306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:13.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:49:10.294 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:10.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:10.295 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ch53ToyP9J8epml1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21306/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:10.296 [print] {
"resourceType": "Procedure",
"id": "21306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:13.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
> *
print COOKIES
11:49:10.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:10.925 [print] {
"resourceType": "Procedure",
"id": "21306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:13.481+02:00",
"source": "#ch53ToyP9J8epml1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-11-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:11.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:12.165 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:14.738+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:14.738+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:12.166 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:12.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:12.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7sCMeavd9zBikkHd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21307/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:12.774 [print] {
"resourceType": "Procedure",
"id": "21307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:15.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:49:12.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:12.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:12.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7sCMeavd9zBikkHd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21307/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:12.775 [print] {
"resourceType": "Procedure",
"id": "21307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:15.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:49:12.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:13.377 [print] {
"resourceType": "Procedure",
"id": "21307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:15.964+02:00",
"source": "#7sCMeavd9zBikkHd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:13.976 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:14.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:17.171+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:17.171+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:14.575 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:15.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:15.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9qrQlXaLUqXLpd3t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21308/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:15.410 [print] {
"resourceType": "Procedure",
"id": "21308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:18.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:49:15.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:15.411 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:15.411 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9qrQlXaLUqXLpd3t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21308/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:15.412 [print] {
"resourceType": "Procedure",
"id": "21308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:18.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
> *
print COOKIES
11:49:15.412 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:16.024 [print] {
"resourceType": "Procedure",
"id": "21308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:18.599+02:00",
"source": "#9qrQlXaLUqXLpd3t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-02-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:16.641 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:17.243 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:19.834+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:19.834+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:17.244 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:18.166 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:18.166 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RUP7tE2uxuEwFE9q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21309/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:18.166 [print] {
"resourceType": "Procedure",
"id": "21309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:21.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:49:18.166 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:18.168 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:18.168 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RUP7tE2uxuEwFE9q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21309/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:18.168 [print] {
"resourceType": "Procedure",
"id": "21309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:21.348+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
> *
print COOKIES
11:49:18.168 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:19.978 [print] {
"resourceType": "Procedure",
"id": "21309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:21.348+02:00",
"source": "#RUP7tE2uxuEwFE9q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-07"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:20.600 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:21.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:23.785+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:23.785+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:21.230 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:21.857 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:21.857 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jXegPZ09b3jATvXh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21310/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:21.857 [print] {
"resourceType": "Procedure",
"id": "21310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:25.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:49:21.857 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:21.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:21.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jXegPZ09b3jATvXh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21310/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:21.859 [print] {
"resourceType": "Procedure",
"id": "21310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:25.047+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:49:21.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:22.470 [print] {
"resourceType": "Procedure",
"id": "21310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:25.047+02:00",
"source": "#jXegPZ09b3jATvXh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:23.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:23.685 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:26.276+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:26.276+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:23.687 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:24.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:24.295 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oCKgebh3z5qOct11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21311/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:24.295 [print] {
"resourceType": "Procedure",
"id": "21311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:27.480+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:49:24.295 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:24.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:24.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oCKgebh3z5qOct11"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21311/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:24.296 [print] {
"resourceType": "Procedure",
"id": "21311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:27.480+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:49:24.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:25.906 [print] {
"resourceType": "Procedure",
"id": "21311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:27.480+02:00",
"source": "#oCKgebh3z5qOct11",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:26.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:27.137 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:29.729+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:29.729+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:27.138 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:27.772 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:27.772 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"siBTlJ5yZO3WBttH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21312/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:27.772 [print] {
"resourceType": "Procedure",
"id": "21312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:30.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:49:27.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:27.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:27.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"siBTlJ5yZO3WBttH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21312/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:27.774 [print] {
"resourceType": "Procedure",
"id": "21312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:30.956+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
> *
print COOKIES
11:49:27.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:28.391 [print] {
"resourceType": "Procedure",
"id": "21312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:30.956+02:00",
"source": "#siBTlJ5yZO3WBttH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-11-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:29.020 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:29.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:32.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:32.214+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:29.662 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:30.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:30.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JXjPqLoNEuRURqMz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21313/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:30.291 [print] {
"resourceType": "Procedure",
"id": "21313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:33.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:49:30.291 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:30.292 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:30.292 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JXjPqLoNEuRURqMz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21313/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:30.292 [print] {
"resourceType": "Procedure",
"id": "21313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:33.471+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
> *
print COOKIES
11:49:30.292 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:31.287 [print] {
"resourceType": "Procedure",
"id": "21313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:33.471+02:00",
"source": "#JXjPqLoNEuRURqMz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:32.122 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:32.940 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:35.316+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:35.316+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:32.941 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:33.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:33.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ym2DcnJEAcAXaQ2d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21314/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:33.581 [print] {
"resourceType": "Procedure",
"id": "21314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:36.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:49:33.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:33.582 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:33.582 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ym2DcnJEAcAXaQ2d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21314/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:33.582 [print] {
"resourceType": "Procedure",
"id": "21314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:36.770+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:49:33.582 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:35.488 [print] {
"resourceType": "Procedure",
"id": "21314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:36.770+02:00",
"source": "#ym2DcnJEAcAXaQ2d",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:36.103 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:36.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:39.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:39.299+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:36.709 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:37.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:37.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QLEeLL77SL1jm37d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21315/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:37.335 [print] {
"resourceType": "Procedure",
"id": "21315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:40.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:49:37.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:37.336 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:37.336 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QLEeLL77SL1jm37d"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21315/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:37.336 [print] {
"resourceType": "Procedure",
"id": "21315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:40.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
> *
print COOKIES
11:49:37.336 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:37.970 [print] {
"resourceType": "Procedure",
"id": "21315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:40.517+02:00",
"source": "#QLEeLL77SL1jm37d",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-12-13"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:38.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:39.201 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:41.761+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:41.761+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:39.202 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:39.851 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:39.851 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fc1iOQqppQZFVc9x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21316/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:39.851 [print] {
"resourceType": "Procedure",
"id": "21316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:43.044+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:49:39.851 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:39.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:39.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Fc1iOQqppQZFVc9x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21316/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:39.852 [print] {
"resourceType": "Procedure",
"id": "21316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:43.044+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
> *
print COOKIES
11:49:39.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:40.468 [print] {
"resourceType": "Procedure",
"id": "21316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:43.044+02:00",
"source": "#Fc1iOQqppQZFVc9x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-05-05"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:41.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:41.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:44.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:44.271+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:41.724 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:42.954 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:42.954 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"noYPwYlPeaUE04aB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21317/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:42.955 [print] {
"resourceType": "Procedure",
"id": "21317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:45.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:49:42.955 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:42.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:42.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"noYPwYlPeaUE04aB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21317/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:42.956 [print] {
"resourceType": "Procedure",
"id": "21317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:45.941+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
> *
print COOKIES
11:49:42.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:43.574 [print] {
"resourceType": "Procedure",
"id": "21317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:45.941+02:00",
"source": "#noYPwYlPeaUE04aB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:44.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:44.818 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:47.399+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:47.399+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:44.819 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:45.455 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:45.455 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LhP2LexUTPPBqHht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21318/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:45.455 [print] {
"resourceType": "Procedure",
"id": "21318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:48.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:49:45.455 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:45.457 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:45.457 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LhP2LexUTPPBqHht"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21318/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:45.457 [print] {
"resourceType": "Procedure",
"id": "21318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:48.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
> *
print COOKIES
11:49:45.457 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:46.295 [print] {
"resourceType": "Procedure",
"id": "21318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:48.649+02:00",
"source": "#LhP2LexUTPPBqHht",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-04-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:46.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:47.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:50.110+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:50.110+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:47.554 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:48.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:48.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wDAM21cVWME5kSD9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21319/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:48.155 [print] {
"resourceType": "Procedure",
"id": "21319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:51.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:49:48.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:48.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:48.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wDAM21cVWME5kSD9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21319/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:48.157 [print] {
"resourceType": "Procedure",
"id": "21319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:51.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:49:48.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:48.774 [print] {
"resourceType": "Procedure",
"id": "21319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:51.349+02:00",
"source": "#wDAM21cVWME5kSD9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:49.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:50.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:52.562+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:52.562+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:50.230 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:50.871 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:50.871 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ohcZ5dTvRPZFeEov"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21320/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:50.871 [print] {
"resourceType": "Procedure",
"id": "21320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:54.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:49:50.871 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:50.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:50.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ohcZ5dTvRPZFeEov"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21320/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:50.872 [print] {
"resourceType": "Procedure",
"id": "21320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:54.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
> *
print COOKIES
11:49:50.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:51.502 [print] {
"resourceType": "Procedure",
"id": "21320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:54.052+02:00",
"source": "#ohcZ5dTvRPZFeEov",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-26"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:52.111 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:52.765 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:55.307+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:55.307+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:52.766 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:53.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:53.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIkBNdCuFZkU1S46"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21321/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:53.378 [print] {
"resourceType": "Procedure",
"id": "21321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:56.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:49:53.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:53.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:53.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIkBNdCuFZkU1S46"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21321/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:53.380 [print] {
"resourceType": "Procedure",
"id": "21321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:56.572+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
> *
print COOKIES
11:49:53.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:54.296 [print] {
"resourceType": "Procedure",
"id": "21321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:56.572+02:00",
"source": "#lIkBNdCuFZkU1S46",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-18"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:54.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:55.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:49:58.120+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:49:58.120+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:55.555 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:56.206 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:56.206 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RkFx1MNrm2fqNTK2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21322/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:56.206 [print] {
"resourceType": "Procedure",
"id": "21322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:59.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:49:56.206 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:56.207 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:56.207 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RkFx1MNrm2fqNTK2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21322/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:49:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:49:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:56.207 [print] {
"resourceType": "Procedure",
"id": "21322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:59.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:49:56.207 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:56.878 [print] {
"resourceType": "Procedure",
"id": "21322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:49:59.389+02:00",
"source": "#RkFx1MNrm2fqNTK2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:49:57.613 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:49:58.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:00.798+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:00.798+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:49:58.234 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:58.947 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:58.947 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rUCaWC6mouAzAr4x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21323/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:58.947 [print] {
"resourceType": "Procedure",
"id": "21323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:02.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:49:58.947 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:49:58.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:49:58.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rUCaWC6mouAzAr4x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21323/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:49:58.948 [print] {
"resourceType": "Procedure",
"id": "21323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:02.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
> *
print COOKIES
11:49:58.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:49:59.570 [print] {
"resourceType": "Procedure",
"id": "21323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:02.140+02:00",
"source": "#rUCaWC6mouAzAr4x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-01-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:00.232 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:00.882 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:03.411+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:03.411+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:00.882 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:01.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:01.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LHd1kKYlI27ABMgX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21324/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:01.540 [print] {
"resourceType": "Procedure",
"id": "21324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:04.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:50:01.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:01.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:01.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LHd1kKYlI27ABMgX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21324/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:01.541 [print] {
"resourceType": "Procedure",
"id": "21324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:04.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:50:01.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:02.187 [print] {
"resourceType": "Procedure",
"id": "21324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:04.723+02:00",
"source": "#LHd1kKYlI27ABMgX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:02.805 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:03.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:05.994+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:05.994+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:03.430 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:04.029 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:04.029 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"arckc5bNNG8HdVO0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21325/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:04.029 [print] {
"resourceType": "Procedure",
"id": "21325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:07.225+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:50:04.029 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:04.031 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:04.031 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"arckc5bNNG8HdVO0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21325/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:04.031 [print] {
"resourceType": "Procedure",
"id": "21325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:07.225+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
> *
print COOKIES
11:50:04.031 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:04.662 [print] {
"resourceType": "Procedure",
"id": "21325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:07.225+02:00",
"source": "#arckc5bNNG8HdVO0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:05.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:06.000 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:08.581+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:08.581+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:06.001 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:06.607 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:06.607 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kqY6oMxTufTy2kTl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21326/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:06.607 [print] {
"resourceType": "Procedure",
"id": "21326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:09.802+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:50:06.607 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:06.609 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:06.609 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kqY6oMxTufTy2kTl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21326/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:06.609 [print] {
"resourceType": "Procedure",
"id": "21326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:09.802+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
> *
print COOKIES
11:50:06.609 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:07.221 [print] {
"resourceType": "Procedure",
"id": "21326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:09.802+02:00",
"source": "#kqY6oMxTufTy2kTl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-08-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:07.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:08.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:11.008+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:11.008+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:08.416 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:09.026 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:09.026 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJnzVAWmqTeDm9U5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21327/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:09.026 [print] {
"resourceType": "Procedure",
"id": "21327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:12.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:50:09.026 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:09.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:09.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJnzVAWmqTeDm9U5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21327/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:09.028 [print] {
"resourceType": "Procedure",
"id": "21327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:12.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
> *
print COOKIES
11:50:09.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:09.626 [print] {
"resourceType": "Procedure",
"id": "21327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:12.222+02:00",
"source": "#oJnzVAWmqTeDm9U5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-06-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:10.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:10.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:13.437+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:13.437+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:10.845 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:11.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:11.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TXqAUwjtdPQrRonl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21328/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:11.489 [print] {
"resourceType": "Procedure",
"id": "21328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:14.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:50:11.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:11.491 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:11.491 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TXqAUwjtdPQrRonl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21328/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:11.492 [print] {
"resourceType": "Procedure",
"id": "21328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:14.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
> *
print COOKIES
11:50:11.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:12.093 [print] {
"resourceType": "Procedure",
"id": "21328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:14.670+02:00",
"source": "#TXqAUwjtdPQrRonl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-08-28"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:12.730 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:13.336 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:15.924+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:15.924+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:13.336 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:13.944 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:13.944 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wANvVzFXMjRMTAqz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21329/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:13.944 [print] {
"resourceType": "Procedure",
"id": "21329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:17.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:50:13.944 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:13.945 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:13.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wANvVzFXMjRMTAqz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21329/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:13.945 [print] {
"resourceType": "Procedure",
"id": "21329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:17.136+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
> *
print COOKIES
11:50:13.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:14.540 [print] {
"resourceType": "Procedure",
"id": "21329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:17.136+02:00",
"source": "#wANvVzFXMjRMTAqz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-04-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:15.167 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:15.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:18.355+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:18.355+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:15.774 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:16.394 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:16.394 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KPyXHS4eGknztc3C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21330/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:16.394 [print] {
"resourceType": "Procedure",
"id": "21330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:19.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:50:16.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:16.395 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:16.395 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KPyXHS4eGknztc3C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21330/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:16.395 [print] {
"resourceType": "Procedure",
"id": "21330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:19.584+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
> *
print COOKIES
11:50:16.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:17.008 [print] {
"resourceType": "Procedure",
"id": "21330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:19.584+02:00",
"source": "#KPyXHS4eGknztc3C",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-07-09"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:17.629 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:18.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:20.826+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:20.826+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:18.521 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:19.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:19.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iL1mIMiuuBpbePW0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21331/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:19.121 [print] {
"resourceType": "Procedure",
"id": "21331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:22.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:50:19.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:19.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:19.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iL1mIMiuuBpbePW0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21331/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:19.122 [print] {
"resourceType": "Procedure",
"id": "21331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:22.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
> *
print COOKIES
11:50:19.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:19.711 [print] {
"resourceType": "Procedure",
"id": "21331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:22.311+02:00",
"source": "#iL1mIMiuuBpbePW0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-04-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:20.367 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:21.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:23.557+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:23.557+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:21.029 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:21.667 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:21.667 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"inzixwOXFizk61yC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21332/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:21.667 [print] {
"resourceType": "Procedure",
"id": "21332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:24.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:50:21.667 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:21.668 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:21.668 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"inzixwOXFizk61yC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21332/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:21.668 [print] {
"resourceType": "Procedure",
"id": "21332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:24.851+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
> *
print COOKIES
11:50:21.668 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:22.281 [print] {
"resourceType": "Procedure",
"id": "21332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:24.851+02:00",
"source": "#inzixwOXFizk61yC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:22.931 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:23.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:26.117+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:26.117+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:23.583 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:24.222 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:24.222 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTohjGrB8mzRjd2i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21333/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:24.222 [print] {
"resourceType": "Procedure",
"id": "21333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:27.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:50:24.222 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:24.223 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:24.223 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTohjGrB8mzRjd2i"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21333/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:24.223 [print] {
"resourceType": "Procedure",
"id": "21333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:27.389+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:50:24.223 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:24.837 [print] {
"resourceType": "Procedure",
"id": "21333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:27.389+02:00",
"source": "#CTohjGrB8mzRjd2i",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:25.806 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:26.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:28.990+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:28.990+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:26.466 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:27.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:27.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"36HxQqprZetzUtZN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21334/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:27.113 [print] {
"resourceType": "Procedure",
"id": "21334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:30.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:50:27.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:27.115 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:27.115 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"36HxQqprZetzUtZN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21334/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:27.115 [print] {
"resourceType": "Procedure",
"id": "21334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:30.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
> *
print COOKIES
11:50:27.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:27.735 [print] {
"resourceType": "Procedure",
"id": "21334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:30.309+02:00",
"source": "#36HxQqprZetzUtZN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:28.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:28.944 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:31.527+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:31.527+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:28.945 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:29.560 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:29.560 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6ahb1cgDfW52hHJQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21335/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:29.560 [print] {
"resourceType": "Procedure",
"id": "21335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:32.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:50:29.560 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:29.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:29.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6ahb1cgDfW52hHJQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21335/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:29.563 [print] {
"resourceType": "Procedure",
"id": "21335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:32.754+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
> *
print COOKIES
11:50:29.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:30.190 [print] {
"resourceType": "Procedure",
"id": "21335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:32.754+02:00",
"source": "#6ahb1cgDfW52hHJQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-08-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:31.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:31.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:34.387+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:34.387+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:31.834 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:32.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:32.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"74sakqieoEhg5stb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21336/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:32.892 [print] {
"resourceType": "Procedure",
"id": "21336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:36.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:50:32.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:32.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:32.893 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"74sakqieoEhg5stb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21336/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:32.893 [print] {
"resourceType": "Procedure",
"id": "21336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:36.088+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:50:32.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:33.720 [print] {
"resourceType": "Procedure",
"id": "21336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:36.088+02:00",
"source": "#74sakqieoEhg5stb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:34.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:34.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:37.555+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:37.555+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:35.000 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:35.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:35.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXXPNuWxH2bNLbi5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21337/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:35.618 [print] {
"resourceType": "Procedure",
"id": "21337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:38.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:50:35.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:35.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:35.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qXXPNuWxH2bNLbi5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21337/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:35.620 [print] {
"resourceType": "Procedure",
"id": "21337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:38.816+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:50:35.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:36.327 [print] {
"resourceType": "Procedure",
"id": "21337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:38.816+02:00",
"source": "#qXXPNuWxH2bNLbi5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:36.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:37.960 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:40.146+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:40.146+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:37.961 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:38.581 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:38.581 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IrFsP8D2OaOLYIQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21338/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:38.581 [print] {
"resourceType": "Procedure",
"id": "21338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:41.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:50:38.581 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:38.582 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:38.582 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IrFsP8D2OaOLYIQY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21338/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:38.582 [print] {
"resourceType": "Procedure",
"id": "21338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:41.773+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
> *
print COOKIES
11:50:38.582 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:39.201 [print] {
"resourceType": "Procedure",
"id": "21338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:41.773+02:00",
"source": "#IrFsP8D2OaOLYIQY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-05-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:39.820 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:40.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:43.009+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:43.009+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:40.467 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:41.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:41.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"47kLRLJjeAGfH4gL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21339/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:41.112 [print] {
"resourceType": "Procedure",
"id": "21339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:44.286+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:50:41.112 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:41.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:41.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"47kLRLJjeAGfH4gL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21339/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:41.113 [print] {
"resourceType": "Procedure",
"id": "21339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:44.286+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
> *
print COOKIES
11:50:41.114 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:41.758 [print] {
"resourceType": "Procedure",
"id": "21339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:44.286+02:00",
"source": "#47kLRLJjeAGfH4gL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-04-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:42.409 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:43.309 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:45.601+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:45.601+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:43.310 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:44.144 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:44.144 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qDB6VXHhrBF6fdLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21340/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:44.144 [print] {
"resourceType": "Procedure",
"id": "21340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:47.340+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:50:44.144 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:44.145 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:44.145 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qDB6VXHhrBF6fdLr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21340/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:44.145 [print] {
"resourceType": "Procedure",
"id": "21340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:47.340+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:50:44.145 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:44.774 [print] {
"resourceType": "Procedure",
"id": "21340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:47.340+02:00",
"source": "#qDB6VXHhrBF6fdLr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:45.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:46.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:48.609+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:48.609+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:46.048 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:46.699 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:46.699 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MZgBxUy2GTCjUlXM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21341/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:46.699 [print] {
"resourceType": "Procedure",
"id": "21341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:49.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:50:46.699 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:46.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:46.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MZgBxUy2GTCjUlXM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21341/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:46.701 [print] {
"resourceType": "Procedure",
"id": "21341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:49.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
> *
print COOKIES
11:50:46.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:47.571 [print] {
"resourceType": "Procedure",
"id": "21341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:49.879+02:00",
"source": "#MZgBxUy2GTCjUlXM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2017-09-20"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:48.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:49.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:51.392+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:51.392+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:49.061 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:49.662 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:49.662 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QcxqnPGxDPOrI6Y0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21342/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:49.662 [print] {
"resourceType": "Procedure",
"id": "21342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:52.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:50:49.662 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:49.663 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:49.663 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QcxqnPGxDPOrI6Y0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21342/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:49.663 [print] {
"resourceType": "Procedure",
"id": "21342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:52.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
> *
print COOKIES
11:50:49.663 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:50.254 [print] {
"resourceType": "Procedure",
"id": "21342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:52.852+02:00",
"source": "#QcxqnPGxDPOrI6Y0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-03-31"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:50.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:52.498 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:54.072+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:54.072+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:52.500 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:53.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:53.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7RocMYbP5NfIAHun"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21343/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:53.117 [print] {
"resourceType": "Procedure",
"id": "21343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:56.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:50:53.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:53.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:53.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7RocMYbP5NfIAHun"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21343/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:53.118 [print] {
"resourceType": "Procedure",
"id": "21343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:56.313+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
> *
print COOKIES
11:50:53.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:53.718 [print] {
"resourceType": "Procedure",
"id": "21343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:56.313+02:00",
"source": "#7RocMYbP5NfIAHun",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-10-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:54.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:55.984 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:50:57.548+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:50:57.548+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:55.986 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:56.731 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:56.731 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ork2GxHSkCmvIIC2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21344/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:56.731 [print] {
"resourceType": "Procedure",
"id": "21344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:59.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:50:56.731 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:56.732 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:56.732 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ork2GxHSkCmvIIC2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21344/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:50:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:50:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:56.732 [print] {
"resourceType": "Procedure",
"id": "21344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:59.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
> *
print COOKIES
11:50:56.732 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:50:57.627 [print] {
"resourceType": "Procedure",
"id": "21344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:50:59.917+02:00",
"source": "#Ork2GxHSkCmvIIC2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2012-12-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:50:58.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:50:58.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:01.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:01.456+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:50:58.864 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:59.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:59.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VIoELehWZLWZ5Ef2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21345/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:59.463 [print] {
"resourceType": "Procedure",
"id": "21345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:02.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:50:59.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:50:59.465 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:50:59.465 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VIoELehWZLWZ5Ef2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21345/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:50:59.465 [print] {
"resourceType": "Procedure",
"id": "21345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:02.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:50:59.465 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:00.076 [print] {
"resourceType": "Procedure",
"id": "21345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:02.661+02:00",
"source": "#VIoELehWZLWZ5Ef2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-02-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:00.695 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:01.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:03.898+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:03.898+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:01.309 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:01.943 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:01.943 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h1LXiN38Kb5a8dqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21346/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:01.943 [print] {
"resourceType": "Procedure",
"id": "21346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:05.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:51:01.943 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:01.944 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:01.944 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h1LXiN38Kb5a8dqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21346/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:01.945 [print] {
"resourceType": "Procedure",
"id": "21346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:05.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
> *
print COOKIES
11:51:01.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:02.549 [print] {
"resourceType": "Procedure",
"id": "21346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:05.142+02:00",
"source": "#h1LXiN38Kb5a8dqq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:03.191 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:03.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:06.389+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:06.389+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:03.816 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:04.437 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:04.437 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5ijKI5TLGoHy5At"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21347/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:04.437 [print] {
"resourceType": "Procedure",
"id": "21347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:07.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:51:04.437 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:04.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:04.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5ijKI5TLGoHy5At"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21347/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:04.438 [print] {
"resourceType": "Procedure",
"id": "21347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:07.628+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
> *
print COOKIES
11:51:04.438 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:05.050 [print] {
"resourceType": "Procedure",
"id": "21347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:07.628+02:00",
"source": "#J5ijKI5TLGoHy5At",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-03-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:05.693 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:06.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:08.889+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:08.889+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:06.318 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:06.945 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:06.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uScz9A20JRCetiZt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21348/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:06.945 [print] {
"resourceType": "Procedure",
"id": "21348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:10.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:51:06.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:06.946 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:06.946 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uScz9A20JRCetiZt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21348/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:06.946 [print] {
"resourceType": "Procedure",
"id": "21348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:10.141+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
> *
print COOKIES
11:51:06.946 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:07.555 [print] {
"resourceType": "Procedure",
"id": "21348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:10.141+02:00",
"source": "#uScz9A20JRCetiZt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-11-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:08.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:08.777 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:11.364+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:11.364+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:08.778 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:09.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:09.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t82qSxD4kAp8Emor"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21349/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:09.403 [print] {
"resourceType": "Procedure",
"id": "21349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:12.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:51:09.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:09.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:09.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t82qSxD4kAp8Emor"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21349/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:09.405 [print] {
"resourceType": "Procedure",
"id": "21349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:12.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
> *
print COOKIES
11:51:09.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:10.011 [print] {
"resourceType": "Procedure",
"id": "21349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:12.597+02:00",
"source": "#t82qSxD4kAp8Emor",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-08-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:11.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:11.654 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:14.192+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:14.192+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:11.655 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:12.558 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:12.558 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M98imGi6rPq4TZgR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21350/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:12.558 [print] {
"resourceType": "Procedure",
"id": "21350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:15.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:51:12.558 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:12.559 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:12.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M98imGi6rPq4TZgR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21350/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:12.559 [print] {
"resourceType": "Procedure",
"id": "21350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:15.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:51:12.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:13.156 [print] {
"resourceType": "Procedure",
"id": "21350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:15.761+02:00",
"source": "#M98imGi6rPq4TZgR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:14.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:14.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:17.237+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:17.237+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:14.629 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:15.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:15.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJaPpwzfazLewwol"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21351/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:15.227 [print] {
"resourceType": "Procedure",
"id": "21351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:18.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:51:15.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:15.229 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:15.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KJaPpwzfazLewwol"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21351/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:15.229 [print] {
"resourceType": "Procedure",
"id": "21351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:18.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
> *
print COOKIES
11:51:15.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:15.847 [print] {
"resourceType": "Procedure",
"id": "21351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:18.429+02:00",
"source": "#KJaPpwzfazLewwol",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-11-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:16.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:17.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:19.674+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:19.674+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:17.087 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:17.738 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:17.739 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wUtZyj85tZjp1Crf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21352/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:17.739 [print] {
"resourceType": "Procedure",
"id": "21352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:20.931+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:51:17.739 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:17.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:17.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wUtZyj85tZjp1Crf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21352/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:17.741 [print] {
"resourceType": "Procedure",
"id": "21352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:20.931+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
> *
print COOKIES
11:51:17.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:18.418 [print] {
"resourceType": "Procedure",
"id": "21352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:20.931+02:00",
"source": "#wUtZyj85tZjp1Crf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2013-09-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:19.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:20.612 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:22.222+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:22.222+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:20.613 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:21.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:21.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T0nP5be7PG6JnNrA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21353/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:21.449 [print] {
"resourceType": "Procedure",
"id": "21353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:24.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:51:21.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:21.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:21.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T0nP5be7PG6JnNrA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21353/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:21.451 [print] {
"resourceType": "Procedure",
"id": "21353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:24.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:51:21.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:22.068 [print] {
"resourceType": "Procedure",
"id": "21353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:24.428+02:00",
"source": "#T0nP5be7PG6JnNrA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:22.696 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:23.301 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:25.895+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:25.895+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:23.302 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:23.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:23.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fvXrqElrKePEittK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21354/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:23.915 [print] {
"resourceType": "Procedure",
"id": "21354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:27.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:51:23.915 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:23.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:23.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fvXrqElrKePEittK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21354/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:23.916 [print] {
"resourceType": "Procedure",
"id": "21354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:27.108+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
> *
print COOKIES
11:51:23.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:24.527 [print] {
"resourceType": "Procedure",
"id": "21354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:27.108+02:00",
"source": "#fvXrqElrKePEittK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-09-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:25.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:26.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:28.757+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:28.757+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:26.250 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:26.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:26.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"quZUTEHv6ZjCV9wX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21355/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:26.872 [print] {
"resourceType": "Procedure",
"id": "21355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:30.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:51:26.873 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:26.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:26.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"quZUTEHv6ZjCV9wX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21355/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:26.874 [print] {
"resourceType": "Procedure",
"id": "21355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:30.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
> *
print COOKIES
11:51:26.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:27.696 [print] {
"resourceType": "Procedure",
"id": "21355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:30.065+02:00",
"source": "#quZUTEHv6ZjCV9wX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-06-17"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:28.331 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:28.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:31.529+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:31.529+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:28.940 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:29.560 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:29.560 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CprJI6yHF2BCtqXl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21356/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:29.560 [print] {
"resourceType": "Procedure",
"id": "21356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:32.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:51:29.560 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:29.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:29.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CprJI6yHF2BCtqXl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21356/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:29.561 [print] {
"resourceType": "Procedure",
"id": "21356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:32.759+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
> *
print COOKIES
11:51:29.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:30.151 [print] {
"resourceType": "Procedure",
"id": "21356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:32.759+02:00",
"source": "#CprJI6yHF2BCtqXl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-12-16"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:30.779 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:31.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:33.980+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:33.980+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:31.779 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:32.395 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:32.395 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BmwQw1bgPSCtSns5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21357/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:32.395 [print] {
"resourceType": "Procedure",
"id": "21357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:35.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:51:32.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:32.397 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:32.397 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BmwQw1bgPSCtSns5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21357/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:32.397 [print] {
"resourceType": "Procedure",
"id": "21357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:35.593+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:51:32.397 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:33.021 [print] {
"resourceType": "Procedure",
"id": "21357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:35.593+02:00",
"source": "#BmwQw1bgPSCtSns5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:33.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:34.232 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:36.834+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:36.834+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:34.234 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:34.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:34.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cc7nI0nH6XeJRtf4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21358/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:34.852 [print] {
"resourceType": "Procedure",
"id": "21358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:38.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:51:34.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:34.853 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:34.853 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cc7nI0nH6XeJRtf4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21358/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:34.853 [print] {
"resourceType": "Procedure",
"id": "21358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:38.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
> *
print COOKIES
11:51:34.853 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:35.613 [print] {
"resourceType": "Procedure",
"id": "21358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:38.054+02:00",
"source": "#cc7nI0nH6XeJRtf4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:36.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:37.098 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:39.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:39.458+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:37.099 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:37.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:37.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Lfyhwd73PVx77gIB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21359/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:37.711 [print] {
"resourceType": "Procedure",
"id": "21359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:40.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:51:37.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:37.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:37.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Lfyhwd73PVx77gIB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21359/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:37.713 [print] {
"resourceType": "Procedure",
"id": "21359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:40.912+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
> *
print COOKIES
11:51:37.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:39.318 [print] {
"resourceType": "Procedure",
"id": "21359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:40.912+02:00",
"source": "#Lfyhwd73PVx77gIB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-29"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:39.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:40.553 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:43.145+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:43.145+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:40.554 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:41.448 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:41.448 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Di8EVm7WXdPv33Zh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21360/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:41.448 [print] {
"resourceType": "Procedure",
"id": "21360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:44.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:51:41.448 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:41.450 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:41.450 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Di8EVm7WXdPv33Zh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21360/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:41.450 [print] {
"resourceType": "Procedure",
"id": "21360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:44.649+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
> *
print COOKIES
11:51:41.450 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:42.100 [print] {
"resourceType": "Procedure",
"id": "21360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:44.649+02:00",
"source": "#Di8EVm7WXdPv33Zh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-05-06"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:42.753 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:43.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:45.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:45.940+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:43.365 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:44.009 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:44.009 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sx6AtxnyYKVsYhGb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21361/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:44.009 [print] {
"resourceType": "Procedure",
"id": "21361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:47.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:51:44.009 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:44.010 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:44.010 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Sx6AtxnyYKVsYhGb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21361/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:44.011 [print] {
"resourceType": "Procedure",
"id": "21361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:47.211+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
> *
print COOKIES
11:51:44.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:44.633 [print] {
"resourceType": "Procedure",
"id": "21361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:47.211+02:00",
"source": "#Sx6AtxnyYKVsYhGb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-06-30"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:45.253 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:45.871 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:48.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:48.456+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:45.872 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:46.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:46.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aE5NNJtDvQqhZI3m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21362/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:46.768 [print] {
"resourceType": "Procedure",
"id": "21362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:49.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:51:46.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:46.770 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"556"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:46.770 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aE5NNJtDvQqhZI3m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21362/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:46.770 [print] {
"resourceType": "Procedure",
"id": "21362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:49.958+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
> *
print COOKIES
11:51:46.770 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:47.388 [print] {
"resourceType": "Procedure",
"id": "21362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:49.958+02:00",
"source": "#aE5NNJtDvQqhZI3m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
],
"text": "Más informacion o notas."
},
"performedDateTime": "2015-02-04"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:48.012 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:48.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:51.210+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:51.210+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:48.618 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:49.224 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:49.224 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qLpVY8msiVYF7D4b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21363/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:49.224 [print] {
"resourceType": "Procedure",
"id": "21363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:52.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:51:49.224 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:49.225 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:49.225 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qLpVY8msiVYF7D4b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21363/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:49.225 [print] {
"resourceType": "Procedure",
"id": "21363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:52.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
> *
print COOKIES
11:51:49.225 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:49.833 [print] {
"resourceType": "Procedure",
"id": "21363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:52.428+02:00",
"source": "#qLpVY8msiVYF7D4b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-11-19"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:50.498 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:51.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:53.693+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:53.693+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:51.143 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:51.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:51.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BlRod9rJz3QGztMK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21364/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:51.744 [print] {
"resourceType": "Procedure",
"id": "21364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:54.943+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:51:51.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:51.745 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:51.746 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BlRod9rJz3QGztMK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21364/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:51.746 [print] {
"resourceType": "Procedure",
"id": "21364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:54.943+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
> *
print COOKIES
11:51:51.746 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:52.616 [print] {
"resourceType": "Procedure",
"id": "21364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:54.943+02:00",
"source": "#BlRod9rJz3QGztMK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2017-11-23"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:53.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:54.911 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:51:56.476+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:51:56.476+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:54.912 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:55.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:55.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TNeCozExUkgYJwY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21365/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:55.555 [print] {
"resourceType": "Procedure",
"id": "21365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:58.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:51:55.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:55.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:55.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TNeCozExUkgYJwY8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21365/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:51:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:51:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:55.556 [print] {
"resourceType": "Procedure",
"id": "21365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:58.743+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
> *
print COOKIES
11:51:55.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:56.193 [print] {
"resourceType": "Procedure",
"id": "21365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:51:58.743+02:00",
"source": "#TNeCozExUkgYJwY8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2016-09-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:56.841 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:51:57.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:00.028+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:00.028+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:51:57.513 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:58.166 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:58.166 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"amsW7pfAW58Qc5Hd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21366/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:58.166 [print] {
"resourceType": "Procedure",
"id": "21366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:01.334+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:51:58.166 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:51:58.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:51:58.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"amsW7pfAW58Qc5Hd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21366/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:51:58.167 [print] {
"resourceType": "Procedure",
"id": "21366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:01.334+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
> *
print COOKIES
11:51:58.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:51:58.788 [print] {
"resourceType": "Procedure",
"id": "21366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:01.334+02:00",
"source": "#amsW7pfAW58Qc5Hd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2015-09-21"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:51:59.424 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:00.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:02.629+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:02.629+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:00.069 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:00.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:00.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1yOrcMsmAlmxb8yn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21367/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:00.688 [print] {
"resourceType": "Procedure",
"id": "21367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:03.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:52:00.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:00.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:00.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1yOrcMsmAlmxb8yn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21367/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:00.689 [print] {
"resourceType": "Procedure",
"id": "21367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:03.889+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
> *
print COOKIES
11:52:00.689 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:01.292 [print] {
"resourceType": "Procedure",
"id": "21367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:03.889+02:00",
"source": "#1yOrcMsmAlmxb8yn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-04-11"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:02.150 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:03.287 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:05.356+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:05.356+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:03.289 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:03.894 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:03.894 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"genhEsRBMMD6b2SV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21368/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:03.894 [print] {
"resourceType": "Procedure",
"id": "21368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:07.099+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:52:03.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:03.895 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:03.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"genhEsRBMMD6b2SV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21368/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:03.896 [print] {
"resourceType": "Procedure",
"id": "21368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:07.099+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
> *
print COOKIES
11:52:03.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:04.502 [print] {
"resourceType": "Procedure",
"id": "21368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:07.099+02:00",
"source": "#genhEsRBMMD6b2SV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2012-10-02"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:05.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:05.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:08.340+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:08.340+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:05.840 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:06.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:06.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HrkTEtfePz01tLy8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21369/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:06.441 [print] {
"resourceType": "Procedure",
"id": "21369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:09.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:52:06.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:06.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:06.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HrkTEtfePz01tLy8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21369/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:06.442 [print] {
"resourceType": "Procedure",
"id": "21369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:09.647+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
> *
print COOKIES
11:52:06.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:07.045 [print] {
"resourceType": "Procedure",
"id": "21369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:09.647+02:00",
"source": "#HrkTEtfePz01tLy8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2015-04-24"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:07.693 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:08.549 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:10.892+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:10.892+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:08.551 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:09.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:09.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uQ6YoMvytgl2CWTt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21370/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:09.147 [print] {
"resourceType": "Procedure",
"id": "21370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:12.352+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:52:09.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:09.148 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:09.148 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uQ6YoMvytgl2CWTt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21370/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:09.148 [print] {
"resourceType": "Procedure",
"id": "21370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:12.352+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
> *
print COOKIES
11:52:09.148 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:09.757 [print] {
"resourceType": "Procedure",
"id": "21370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:12.352+02:00",
"source": "#uQ6YoMvytgl2CWTt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2014-08-25"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:10.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:11.001 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:13.584+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:13.584+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:11.002 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:11.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:11.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KQvuFZNgfucFm1H4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21371/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:11.629 [print] {
"resourceType": "Procedure",
"id": "21371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:14.824+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:52:11.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:11.630 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:11.630 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KQvuFZNgfucFm1H4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21371/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:11.630 [print] {
"resourceType": "Procedure",
"id": "21371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:14.824+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
> *
print COOKIES
11:52:11.630 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:12.239 [print] {
"resourceType": "Procedure",
"id": "21371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:14.824+02:00",
"source": "#KQvuFZNgfucFm1H4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2013-05-03"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:12.868 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:13.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:16.072+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:16.072+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:13.476 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:14.080 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:14.080 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jlsWGx3ScSG0j94j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21372/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:14.080 [print] {
"resourceType": "Procedure",
"id": "21372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:17.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:52:14.080 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:14.081 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"522"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:14.081 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jlsWGx3ScSG0j94j"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21372/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:14.082 [print] {
"resourceType": "Procedure",
"id": "21372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:17.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
> *
print COOKIES
11:52:14.082 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:14.703 [print] {
"resourceType": "Procedure",
"id": "21372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:17.284+02:00",
"source": "#jlsWGx3ScSG0j94j",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "50223000",
"display": "Transplante alogénico"
}
]
},
"performedDateTime": "2016-01-01"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:15.344 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:15.980 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:18.550+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:18.550+02:00"
}
]
}
@Delete
@Post
@Get
@Procedure
@Only-api
Scenario Outline: The hospital sends a FHIR Procedure resource.
Given
path '/Procedure'
And
print resource
11:52:15.982 [print] {
"resourceType": "Procedure",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:16.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:16.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xA7zgkACKyW3RwUI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21373/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:16.914 [print] {
"resourceType": "Procedure",
"id": "21373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:20.112+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:52:16.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
11:52:16.915 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"521"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
11:52:16.915 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xA7zgkACKyW3RwUI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21373/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 09:52:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Procedure/21373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 09:52:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
11:52:16.915 [print] {
"resourceType": "Procedure",
"id": "21373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:20.112+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
> *
print COOKIES
11:52:16.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
11:52:17.514 [print] {
"resourceType": "Procedure",
"id": "21373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T11:52:20.112+02:00",
"source": "#xA7zgkACKyW3RwUI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Procedure-sct-eu-pcsp"
]
},
"language": "ES",
"status": "completed",
"category": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "77465005",
"display": "Transplantation (procedure)"
}
]
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "53088000",
"display": "Transplante autógeno"
}
]
},
"performedDateTime": "2014-05-08"
}
When
print 'They try to delete the Procedure resource from the server'
And
method DELETE
Then
status 200
And
print response
11:52:18.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Procedure resource is on the server'
And
method GET
Then
status 410
And
print response
11:52:18.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T11:52:21.335+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T11:52:21.335+02:00"
}
]
}